1100 |
How can I advance to the next line, once the user presses the ENTER key
// KeyDown event - Occurs when the user presses a key while an object has the focus. void OnKeyDownGrid1(short FAR* KeyCode,short Shift) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); OutputDebugStringW( L"KeyCode Before:" ); OutputDebugStringW( L"KeyCode" ); KeyCode = spGrid1->FormatABC(L"value = 13 ? 40 : value",KeyCode,vtMissing,vtMissing); OutputDebugStringW( L"KeyCode After:" ); OutputDebugStringW( L"KeyCode" ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"A")))->GetEditor(); var_Editor->PutAppearance(EXGRIDLib::EtchedApp); var_Editor->PutEditType(EXGRIDLib::EditType); EXGRIDLib::IEditorPtr var_Editor1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"B")))->GetEditor(); var_Editor1->PutAppearance(EXGRIDLib::EtchedApp); var_Editor1->PutEditType(EXGRIDLib::EditType); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h0 = var_Items->AddItem("Item A.1"); var_Items->PutCellValue(h0,long(1),"Item B.1"); h0 = var_Items->AddItem("Item A.2"); var_Items->PutCellValue(h0,long(1),"Item B.2"); spGrid1->EndUpdate(); |
1099 |
I am using AddNew to add new records, but I can not see them into the control
// ButtonClick event - Occurs when user clicks on the cell's button. void OnButtonClickGrid1(long Item,long ColIndex,VARIANT Key) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr var_Recordset = ((ADODB::_RecordsetPtr)(spGrid1->GetDataSource())); var_Recordset->AddNew(vtMissing,vtMissing); var_Recordset->GetFields()->GetItem("A")->PutValue("new A"); var_Recordset->GetFields()->GetItem("B")->PutValue("new B"); var_Recordset->Update(vtMissing,vtMissing); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADODB.Recordset"); rs->GetFields()->Append(L"A",ADODB::adBSTR,0,vtMissing,vtMissing); rs->GetFields()->Append(L"B",ADODB::adBSTR,0,vtMissing,vtMissing); rs->Open(vtMissing,vtMissing,vtMissing,vtMissing,0); rs->AddNew(vtMissing,vtMissing); rs->GetFields()->GetItem("A")->PutValue("Item A.1"); rs->GetFields()->GetItem("B")->PutValue("Item B.1"); rs->Update(vtMissing,vtMissing); rs->AddNew(vtMissing,vtMissing); rs->GetFields()->GetItem("A")->PutValue("Item A.2"); rs->GetFields()->GetItem("B")->PutValue("Item B.2"); rs->Update(vtMissing,vtMissing); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutLockedItemCount(EXGRIDLib::exTop,1); long h = var_Items->GetLockedItem(EXGRIDLib::exTop,0); var_Items->PutItemDivider(h,0); var_Items->PutCellHasButton(h,long(0),VARIANT_TRUE); var_Items->PutCellValue(h,long(0),"AddNew"); var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment); spGrid1->PutDetectAddNew(VARIANT_TRUE); spGrid1->PutDetectDelete(VARIANT_TRUE); spGrid1->EndUpdate(); |
1098 |
How can I create a new ADO recordset
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADODB.Recordset"); rs->GetFields()->Append(L"A",ADODB::adBSTR,0,vtMissing,vtMissing); rs->GetFields()->Append(L"B",ADODB::adBSTR,0,vtMissing,vtMissing); rs->Open(vtMissing,vtMissing,vtMissing,vtMissing,0); rs->AddNew(vtMissing,vtMissing); rs->GetFields()->GetItem("A")->PutValue("Item A.1"); rs->GetFields()->GetItem("B")->PutValue("Item B.1"); rs->Update(vtMissing,vtMissing); rs->AddNew(vtMissing,vtMissing); rs->GetFields()->GetItem("A")->PutValue("Item A.2"); rs->GetFields()->GetItem("B")->PutValue("Item B.2"); rs->Update(vtMissing,vtMissing); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->EndUpdate(); |
1097 |
Do do I get the DAO version I have installed
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ OutputDebugStringW( ::CreateObject(L"DAO.DBEngine.35")->GetVersion()->GetVersion() ); OutputDebugStringW( ::CreateObject(L"DAO.DBEngine.36")->GetVersion()->GetVersion() ); OutputDebugStringW( ::CreateObject(L"DAO.DBEngine.120")->GetVersion()->GetVersion() ); |
1096 |
How do I get a list of interfaces the object implemenets
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'DAO' for the library: 'Microsoft Office 15.0 Access database engine Object Library' #import <ACEDAO.DLL> */ DAO::_DBEnginePtr var_PrivDBEngine = ::CreateObject(L"DAO.DBEngine.120"); DAO::Recordset2Ptr rs = ((DAO::Recordset2Ptr)(var_PrivDBEngine->OpenDatabase(L"C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",vtMissing,vtMissing,vtMissing)->OpenRecordset(L"Orders",vtMissing,vtMissing,vtMissing))); OutputDebugStringW( ::CreateObject(L"Exontrol.PropertiesList")->GetInterfaces(rs)->GetInterfaces(rs) ); spGrid1->PutDataSource(((DAO::Recordset2Ptr)(rs))); spGrid1->EndUpdate(); |
1095 |
Do do I get the ADO version I have installed
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ OutputDebugStringW( L"ADO Version:" ); OutputDebugStringW( ::CreateObject(L"ADODB.Connection")->GetVersion()->GetVersion() ); |
1094 |
DAO, ACCDB, 120
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'DAO' for the library: 'Microsoft Office 15.0 Access database engine Object Library' #import <ACEDAO.DLL> */ DAO::_DBEnginePtr var_PrivDBEngine = ::CreateObject(L"DAO.DBEngine.120"); DAO::Recordset2Ptr rs = ((DAO::Recordset2Ptr)(var_PrivDBEngine->OpenDatabase(L"C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",vtMissing,vtMissing,vtMissing)->OpenRecordset(L"Orders",vtMissing,vtMissing,vtMissing))); spGrid1->PutDataSource(((DAO::Recordset2Ptr)(rs))); spGrid1->EndUpdate(); |
1093 |
DAO, MDB, 120
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'DAO' for the library: 'Microsoft Office 15.0 Access database engine Object Library' #import <ACEDAO.DLL> */ DAO::_DBEnginePtr var_PrivDBEngine = ::CreateObject(L"DAO.DBEngine.120"); DAO::Recordset2Ptr rs = ((DAO::Recordset2Ptr)(var_PrivDBEngine->OpenDatabase(L"C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",vtMissing,vtMissing,vtMissing)->OpenRecordset(L"Orders",vtMissing,vtMissing,vtMissing))); spGrid1->PutDataSource(((DAO::Recordset2Ptr)(rs))); spGrid1->EndUpdate(); |
1092 |
DAO, MDB
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'DAO' for the library: 'Microsoft DAO 3.6 Object Library' #import <dao360.dll> */ DAO::_DBEnginePtr var_PrivDBEngine = ::CreateObject(L"DAO.DBEngine.36"); DAO::RecordsetPtr rs = var_PrivDBEngine->OpenDatabase(L"C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.mdb",vtMissing,vtMissing,vtMissing)->OpenRecordset(L"Orders",vtMissing,vtMissing,vtMissing); spGrid1->PutDataSource(((DAO::RecordsetPtr)(rs))); spGrid1->EndUpdate(); |
1091 |
ADODB, ACCDB, x64
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADODB.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenKeyset,ADODB::adLockReadOnly,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->EndUpdate(); |
1090 |
ADOR, ACCDB
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->EndUpdate(); |
1089 |
ADODB, MDB
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADODB.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->EndUpdate(); |
1088 |
ADOR, MDB
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spGrid1->EndUpdate(); |
1087 |
How can I display the row on multiple lines (excrd)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutSelBackMode(EXGRIDLib::exTransparent); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default"))); var_Column->PutDef(EXGRIDLib::exCellFormatLevel,_bstr_t("[b=0]60;1[b=15]:60,((20;\"<fgcolor=808080>Dateigröße\"[b=1][a=2]:120,2[b=15])/(20;\"<fgcolor=808080>Erstellt am\"[a=2]:120,3[b=") + "15])/(20;\"<fgcolor=808080>Zuletzt bearbeitet\"[b=4][a=2]:120,4[b=15]))"); var_Column->PutAllowSort(VARIANT_FALSE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"1")))->PutVisible(VARIANT_FALSE); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"2"))); var_Column1->PutVisible(VARIANT_FALSE); var_Column1->GetEditor()->PutEditType(EXGRIDLib::EditType); var_Column1->PutFormatColumn(L"1 index `A-Z`"); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"3"))); var_Column2->PutVisible(VARIANT_FALSE); var_Column2->GetEditor()->PutEditType(EXGRIDLib::EditType); var_Column2->PutFormatColumn(L"1 index ``"); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"4"))); var_Column3->PutVisible(VARIANT_FALSE); var_Column3->GetEditor()->PutEditType(EXGRIDLib::EditType); var_Column3->PutFormatColumn(L"date(``)"); spGrid1->PutDefaultItemHeight(48); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesSolid); spGrid1->PutViewModeOption(EXGRIDLib::exTableView,EXGRIDLib::exBorderWidth,long(1)); spGrid1->PutViewModeOption(EXGRIDLib::exTableView,EXGRIDLib::exBorderHeight,long(1)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(""),long(1),"One"); var_Items->PutCellValue(var_Items->AddItem(""),long(1),"Two"); var_Items->PutCellValue(var_Items->AddItem(""),long(1),"Three"); spGrid1->EndUpdate(); |
1086 |
Type of wraps the cell's caption support (Sample 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderSingleLine(VARIANT_FALSE); spGrid1->PutHeaderHeight(36); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->PutScrollBySingleLine(VARIANT_TRUE); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Single-Line (exCaptionSingleLine)"))); var_Column->PutWidth(96); var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column->PutDef(EXGRIDLib::exCellSingleLine,long(-1)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Word-Wrap (exCaptionWordWrap)"))); var_Column1->PutWidth(96); var_Column1->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column1->PutDef(EXGRIDLib::exCellSingleLine,long(0)); var_Column1->PutFormatColumn(L"%0"); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Break-Wrap (exCaptionBreakWrap)"))); var_Column2->PutWidth(96); var_Column2->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column2->PutDef(EXGRIDLib::exCellSingleLine,long(1)); var_Column2->PutFormatColumn(L"%0"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line."); var_Items->AddItem("This is the <b>first</b> line.\\r\\nThis is the <b>second</b> line.\\r\\nThis is the <b>third</b> line."); spGrid1->EndUpdate(); |
1085 |
Type of wraps the cell's caption support (Sample 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderSingleLine(VARIANT_FALSE); spGrid1->PutHeaderHeight(36); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->PutScrollBySingleLine(VARIANT_TRUE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default")))->PutWidth(128); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line."); h = var_Items->AddItem("This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line."); var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML); h = var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line."); var_Items->PutCellSingleLine(h,long(0),EXGRIDLib::exCaptionWordWrap); h = var_Items->AddItem("This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line."); var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML); var_Items->PutCellSingleLine(h,long(0),EXGRIDLib::exCaptionWordWrap); h = var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line."); var_Items->PutCellSingleLine(h,long(0),EXGRIDLib::exCaptionBreakWrap); h = var_Items->AddItem("This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line."); var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML); var_Items->PutCellSingleLine(h,long(0),EXGRIDLib::exCaptionBreakWrap); spGrid1->EndUpdate(); |
1084 |
Can I break the cell's caption using the line break <br> or \r\n (Sample 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->PutScrollBySingleLine(VARIANT_TRUE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default")))->PutWidth(128); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellSingleLine(var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line."),long(0),EXGRIDLib::exCaptionBreakWrap); var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line."); spGrid1->EndUpdate(); |
1083 |
Can I break the cell's caption using the line break <br> or \r\n (Sample 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines); spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesGeometric); spGrid1->PutColumnAutoResize(VARIANT_FALSE); spGrid1->PutScrollBySingleLine(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default"))); var_Column->PutWidth(196); var_Column->PutDef(EXGRIDLib::exCellSingleLine,long(1)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem(_bstr_t("<solidline><b>Bank Account</b></solidline><br>+ owner: String <r><a 1;properties>+</a><br><solidline>+ balance: Currency = 0</s") + "olidline><br>+ deposit(amount: Currency)<r><a ;methods>+</a><br>+ withdraw(amount: Currency)"); var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML); var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line."); spGrid1->EndUpdate(); |
1082 |
How can I change the visual appearance/color of the Filter For ... field
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutBackColorHeader(RGB(1,0,0)); spGrid1->PutForeColorHeader(RGB(255,255,255)); spGrid1->PutBackground(EXGRIDLib::exBackColorFilter,spGrid1->GetBackColorHeader()); spGrid1->PutBackground(EXGRIDLib::exForeColorFilter,spGrid1->GetForeColorHeader()); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarButton,RGB(240,240,240)); spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,-1); spGrid1->PutHeaderAppearance(EXGRIDLib::Bump); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items"))); var_Column->PutFilterOnType(VARIANT_TRUE); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::exNoItems); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); spGrid1->EndUpdate(); |
1081 |
How can I display the cell's caption without spaces on both sides
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default"))); var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column->PutFormatColumn(L"((trim(value) replace ` ` with ` `) replace ` ` with ` `) replace ` ` with `<bgcolor=FF0000> </bgcolor>`"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(""); var_Items->AddItem("Item A"); var_Items->AddItem(" Item B"); var_Items->AddItem(" Item C "); spGrid1->EndUpdate(); |
1080 |
How can I highlight the spaces within the column (sample 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default"))); var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column->PutFormatColumn(L"`'` + ( value replace ` ` with `_` ) + `'`"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(""); var_Items->AddItem("Item A"); var_Items->AddItem(" Item B"); var_Items->AddItem(" Item C "); spGrid1->EndUpdate(); |
1079 |
How can I highlight the spaces within the column (sample 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default"))); var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column->PutFormatColumn(L"len(value) = 0 ? `<bgcolor=FF0000> </bgcolor>` : ( value replace ` ` with `<bgcolor=FF0000> </bgcolor>` )"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(""); var_Items->AddItem("Item A"); var_Items->AddItem(" Item B"); var_Items->AddItem(" Item C "); spGrid1->EndUpdate(); |
1078 |
How can I change the visual aspect of the drop down filter-calendar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutBackground(EXGRIDLib::exBackColorFilter,RGB(0,0,1)); spGrid1->PutBackground(EXGRIDLib::exForeColorFilter,RGB(255,255,255)); spGrid1->PutBackground(EXGRIDLib::exDateScrollRange,RGB(255,255,255)); spGrid1->PutBackground(EXGRIDLib::exDateHeader,spGrid1->GetBackground(EXGRIDLib::exBackColorFilter)); spGrid1->PutBackground(EXGRIDLib::exDateScrollThumb,RGB(128,128,128)); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Date"))); var_Column->PutFilterType(EXGRIDLib::exDate); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterDate(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_FALSE); spGrid1->EndUpdate(); |
1077 |
How can I hide the filter bar description
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Filter"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXGRIDLib::exFilter); var_Column->PutFilter(L"B"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("A"); var_Items->AddItem("B"); var_Items->AddItem("C"); spGrid1->ApplyFilter(); spGrid1->PutFilterBarHeight(0); spGrid1->EndUpdate(); |
1076 |
Export Data in HTML format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutBackColorAlternate(RGB(240,240,240)); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,_bstr_t(spGrid1->FormatABC(L"`<fgcolor=808080> ` + value + ` </fgcolor>`",spGrid1->GetDescription(EXGRIDLib::exFilterBarAnd),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(_bstr_t("(( ( value replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace ") + "`[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` ) + `<r><fgcolor=808080>` + ( matc" + "hitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcou" + "nt + ` item(s)`) )))"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarShowCloseIfRequired | EXGRIDLib::exFilterBarSingleLine | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->PutFilterBarPromptType(EXGRIDLib::exFilterPromptContainsAny); EXGRIDLib::IConditionalFormatsPtr var_ConditionalFormats = spGrid1->GetConditionalFormats(); var_ConditionalFormats->Add(L"%0 like `*parent*`","parent")->PutBackColor(RGB(192,192,192)); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"%0 like `*child*`","child"); var_ConditionalFormat->PutForeColor(RGB(255,128,128)); var_ConditionalFormat->PutApplyTo(EXGRIDLib::exFormatToColumns); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat1 = var_ConditionalFormats->Add(L"%0 like `*B*`","b"); var_ConditionalFormat1->PutForeColor(RGB(0,0,255)); var_ConditionalFormat1->PutBold(VARIANT_TRUE); var_ConditionalFormat1->PutItalic(VARIANT_TRUE); var_ConditionalFormat1->PutApplyTo(EXGRIDLib::exFormatToColumns); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Value"))); var_Column->PutWidth(128); var_Column->PutHTMLCaption(L"<b>VA</b><r>sko"); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"APos"))); var_Column1->PutFormatColumn(L"0 apos ``"); var_Column1->PutAllowSort(VARIANT_FALSE); var_Column1->PutDef(EXGRIDLib::exCellBackColor,long(15790320)); var_Column1->PutDef(EXGRIDLib::exCellForeColor,long(8421504)); var_Column1->PutDef(EXGRIDLib::exHeaderForeColor,var_Column1->GetDef(EXGRIDLib::exCellForeColor)); var_Column1->PutPosition(0); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"RPos"))); var_Column2->PutFormatColumn(L"0 rpos ``"); var_Column2->PutAllowSort(VARIANT_FALSE); var_Column2->PutPosition(1); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Index"))); var_Column3->PutFormatColumn(L"0 index ``"); var_Column3->PutDisplayFilterButton(VARIANT_TRUE); var_Column3->PutFilterList(EXGRIDLib::exShowCheckBox); var_Column3->PutPosition(2); EXGRIDLib::IColumnPtr var_Column4 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Data 1"))); var_Column4->PutFormatColumn(L"0 index `A-Z`"); var_Column4->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column5 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Data 2"))); var_Column5->PutFormatColumn(L"0 index `AB` replace `A` with `<off -4>A</off>`"); var_Column5->PutDef(EXGRIDLib::exCellSingleLine,VARIANT_FALSE); var_Column5->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column5->PutDef(EXGRIDLib::exCellHasRadioButton,VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column6 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Data 3"))); var_Column6->PutFormatColumn(L"0 index `CDC` replace `D` with `<b>D</b>`"); var_Column6->PutDef(EXGRIDLib::exCellValueFormat,long(1)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("ParentA"); var_Items->InsertItem(h,vtMissing,"Child A"); var_Items->InsertItem(h,vtMissing,"Child B"); var_Items->PutCellState(h,long(4),1); var_Items->PutCellBackColor(var_Items->InsertItem(h,vtMissing,"Child C"),long(5),RGB(0,255,0)); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->AddItem("Item A"); h = var_Items->AddItem("ParentB"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutCellBackColor(var_Items->InsertItem(h,vtMissing,"Child 3"),long(5),RGB(0,255,0)); var_Items->PutCellState(h,long(5),1); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); var_Items->AddItem("Item D"); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); _bstr_t sFile = "c:/temp/export.html"; spGrid1->Export(sFile,"vis"); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'SHDocVw' for the library: 'Microsoft Internet Controls' #import <ieframe.dll> */ SHDocVw::IWebBrowser2Ptr var_ShellBrowserWindow = ::CreateObject(L"InternetExplorer.Application"); var_ShellBrowserWindow->Navigate2(sFile,vtMissing,vtMissing,vtMissing,vtMissing); |
1075 |
Export Data in CSV format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutBackColorAlternate(RGB(240,240,240)); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,_bstr_t(spGrid1->FormatABC(L"`<fgcolor=808080> ` + value + ` </fgcolor>`",spGrid1->GetDescription(EXGRIDLib::exFilterBarAnd),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(_bstr_t("(( ( value replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace ") + "`[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` ) + `<r><fgcolor=808080>` + ( matc" + "hitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcou" + "nt + ` item(s)`) )))"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarShowCloseIfRequired | EXGRIDLib::exFilterBarSingleLine | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->PutFilterBarPromptType(EXGRIDLib::exFilterPromptContainsAny); EXGRIDLib::IConditionalFormatsPtr var_ConditionalFormats = spGrid1->GetConditionalFormats(); var_ConditionalFormats->Add(L"%0 like `*parent*`","parent")->PutBackColor(RGB(192,192,192)); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"%0 like `*child*`","child"); var_ConditionalFormat->PutForeColor(RGB(255,128,128)); var_ConditionalFormat->PutApplyTo(EXGRIDLib::exFormatToColumns); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat1 = var_ConditionalFormats->Add(L"%0 like `*B*`","b"); var_ConditionalFormat1->PutForeColor(RGB(0,0,255)); var_ConditionalFormat1->PutBold(VARIANT_TRUE); var_ConditionalFormat1->PutItalic(VARIANT_TRUE); var_ConditionalFormat1->PutApplyTo(EXGRIDLib::exFormatToColumns); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Value"))); var_Column->PutWidth(128); var_Column->PutHTMLCaption(L"<b>VA</b><r>sko"); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"APos"))); var_Column1->PutFormatColumn(L"0 apos ``"); var_Column1->PutAllowSort(VARIANT_FALSE); var_Column1->PutDef(EXGRIDLib::exCellBackColor,long(15790320)); var_Column1->PutDef(EXGRIDLib::exCellForeColor,long(8421504)); var_Column1->PutDef(EXGRIDLib::exHeaderForeColor,var_Column1->GetDef(EXGRIDLib::exCellForeColor)); var_Column1->PutPosition(0); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"RPos"))); var_Column2->PutFormatColumn(L"0 rpos ``"); var_Column2->PutAllowSort(VARIANT_FALSE); var_Column2->PutPosition(1); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Index"))); var_Column3->PutFormatColumn(L"0 index ``"); var_Column3->PutDisplayFilterButton(VARIANT_TRUE); var_Column3->PutFilterList(EXGRIDLib::exShowCheckBox); var_Column3->PutPosition(2); EXGRIDLib::IColumnPtr var_Column4 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Data 1"))); var_Column4->PutFormatColumn(L"0 index `A-Z`"); var_Column4->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column5 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Data 2"))); var_Column5->PutFormatColumn(L"0 index `AB` replace `A` with `<off -4>A</off>`"); var_Column5->PutDef(EXGRIDLib::exCellSingleLine,VARIANT_FALSE); var_Column5->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column5->PutDef(EXGRIDLib::exCellHasRadioButton,VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column6 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Data 3"))); var_Column6->PutFormatColumn(L"0 index `CDC` replace `D` with `<b>D</b>`"); var_Column6->PutDef(EXGRIDLib::exCellValueFormat,long(1)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("ParentA"); var_Items->InsertItem(h,vtMissing,"Child A"); var_Items->InsertItem(h,vtMissing,"Child B"); var_Items->PutCellState(h,long(4),1); var_Items->PutCellBackColor(var_Items->InsertItem(h,vtMissing,"Child C"),long(5),RGB(0,255,0)); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->AddItem("Item A"); h = var_Items->AddItem("ParentB"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutCellBackColor(var_Items->InsertItem(h,vtMissing,"Child 3"),long(5),RGB(0,255,0)); var_Items->PutCellState(h,long(5),1); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); var_Items->AddItem("Item D"); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); OutputDebugStringW( _bstr_t(spGrid1->Export("","vis")) ); |
1074 |
Is it possible to check multiple-items at once
|
1073 |
How can I get the icon from the cell when using the Items.CellImages property (icon index)
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveGrid1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); long i = spGrid1->GetItemFromPoint(-1,-1,c,hit); OutputDebugStringW( _bstr_t(spGrid1->FormatABC(L"( 0x44 = ( value bitand 0x44 ) ) ? ( ( (value bitand 0xFFFF0000) bitshift 16 ) array B split `,` ) : `no image`",hit,spGrid1->GetItems()->GetCellImages(i,c),vtMissing)) ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellImages(var_Items->AddItem("Item 1"),long(0),"3,2,1"); var_Items->PutCellImages(var_Items->AddItem("Item 2"),long(0),"2,3"); var_Items->PutCellImages(var_Items->AddItem("Item 3"),long(0),"2,"); spGrid1->EndUpdate(); |
1072 |
How can I get the icon from the cell when using the Items.CellImages property (icon position within the cell)
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveGrid1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); long i = spGrid1->GetItemFromPoint(-1,-1,c,hit); OutputDebugStringW( _bstr_t(spGrid1->FormatABC(L"( 0x44 = ( value bitand 0x44 ) ) ? 1 + ( (value bitand 0xFFFF0000) bitshift 16 ) : `no image`",hit,vtMissing,vtMissing)) ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellImages(var_Items->AddItem("Item 1"),long(0),"3,2,1"); var_Items->PutCellImages(var_Items->AddItem("Item 2"),long(0),"2,3"); var_Items->PutCellImages(var_Items->AddItem("Item 3"),long(0),"2"); spGrid1->EndUpdate(); |
1071 |
Is it possible to change the visual appearance of the position signs when user changes the column's position by drag and drop
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"Column 1"); var_Columns->Add(L"Column 2"); var_Columns->Add(L"Column 3"); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABZEGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADKMA4SOKIZhrE4bBhGaQRUgyI43RhHUBzV") + "IUcQvE6TZRHCQYHgkNIhDJIM7TPLkeSVJaTIRoKhJUogApQThTMgVRDEThkGoSa6soSoYTDBKybLrSLKagOT5YUDKUqSdKEZRpEq1YztWbaQoCUoqVRRVIWfbNd4JJa4" + "aDhWpYdpeeY5R7bWLgBYVVABL7LLRsSxpHxPF6RXxaeI3GKsaS8G6ic6nPQMHj7I4NS5pUa6Rh2VYNSa8AAtETRYznOw4bTMXAjNIea5bAYIIR5HIoDzVbQcCQAHL9DB" + "eEMIQEEISgGhMGZQmocgymoYRRCIEQ0G2HYBnEIBig4V4zCQGINnmagCECY43medZ6H2Pw/g+X5fnueh/h+R5+AKABfkMWgGgGYA4AICoCGCE5WA4CphACMgSD2IRIDI" + "BICmEd5YGCBpRjGBgegWIYIgWdgoGIRQsiKCZiAiJZ0gGQI4jUS4LECOAiBmDJflGfg2BSY4Al4OhGkOCJ2DgFJjGGfgqgiH5Ch4RhGkqOQmEOEpkFkHQYhJRYyESAok" + "GKHhIhKIxJEmf4VGUeRGFmF5iBkchPhYJQ5GoYIZg6Ug6GoFYmkmNhuhulRGHKGoImefh0BUZ4JmYeoemeSZ2H6HQmgoBgXDqXwUAQgI="); var_Appearance->Add(2,"CP:1 0 -36 0 0"); spGrid1->PutBackground(EXGRIDLib::exColumnsPositionSign,0x2000000); spGrid1->EndUpdate(); |
1070 |
How can I add a title column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderHeight(22); spGrid1->PutHeaderAppearance(EXGRIDLib::Etched); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"Col 1"); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Col 2")))->PutFormatColumn(L"1 pos ``"); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Col 3")))->PutFormatColumn(L"1 pos `A-`"); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Col 4")))->PutFormatColumn(L"1 pos `A-Z`"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Title"))); var_Column->PutExpandColumns(L"0,1,2,3"); var_Column->PutDisplayExpandButton(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutAllowDragging(VARIANT_FALSE); var_Column->PutPosition(0); var_Column->PutHeaderAlignment(EXGRIDLib::CenterAlignment); spGrid1->PutColumnAutoResize(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item 1"); var_Items->AddItem("Item 2"); var_Items->AddItem("Item 3"); var_Items->AddItem("Item 4"); spGrid1->EndUpdate(); OutputDebugStringW( _bstr_t(spGrid1->Export("",vtMissing)) ); |
1069 |
FilterBarCaption ALLUI Keyword ( sample 3, result, leaf )
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void OnAddGroupItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemBackColor(Item,RGB(240,240,240)); _variant_t val = var_Items->GetCellValue(Item,var_Items->GetGroupItem(Item)); var_Items->PutCellState(Item,var_Items->GetGroupItem(Item),spGrid1->FormatABC(L"A = `Checked` ? 1 : 0",val,vtMissing,vtMissing)); } // AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemGrid1(long Item) { EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); _variant_t i = spGrid1->FormatABC(L"value + 1",spGrid1->GetItems()->GetItemToIndex(Item),vtMissing,vtMissing); spGrid1->GetItems()->PutCellImage(Item,long(3),i); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); var_Column2->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column2->PutDisplayFilterButton(VARIANT_TRUE); var_Column2->PutDisplayFilterPattern(VARIANT_FALSE); var_Column2->PutFilterType(EXGRIDLib::exCheck); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Image"))); var_Column3->PutDisplayFilterButton(VARIANT_TRUE); var_Column3->PutFilterType(EXGRIDLib::exImage); var_Column3->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox)); EXGRIDLib::IColumnPtr var_Column4 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column4->PutAllowSizing(VARIANT_FALSE); var_Column4->PutAllowSort(VARIANT_FALSE); var_Column4->PutWidth(32); var_Column4->PutFormatColumn(L"1 rpos ``"); var_Column4->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"Sub-Item A"); long h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"Sub-Item B"); var_Items->PutCellState(h,long(2),1); var_Items->PutCellValue(var_Items->AddItem("Item C"),long(1),"Sub-Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,_bstr_t(spGrid1->FormatABC(L"`<fgcolor=808080> ` + value + ` </fgcolor>`",spGrid1->GetDescription(EXGRIDLib::exFilterBarAnd),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(_bstr_t("(( ( allui replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace ") + "`[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` ) + `<r><fgcolor=808080>` + ( matc" + "hitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + leafitemcount + ` result(s)` ) : (`<r><fgcolor=808080>`+ leafitemcount + `" + " item(s)`) )))"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->PutAllowGroupBy(VARIANT_TRUE); spGrid1->PutSortBarVisible(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column5 = spGrid1->GetColumns()->GetItem(long(2)); var_Column5->PutFormatColumn(L"%CS2 ? `Checked` : `Unchecked`"); var_Column5->PutSortOrder(EXGRIDLib::SortAscending); spGrid1->EndUpdate(); |
1068 |
A black portion is shown while I am using the BackColorAlternate with EBN colors. What can I do
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_TRUE); spGrid1->PutDefaultItemHeight(20); spGrid1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhIDhAxHAxg0HG0Mg4xGI3HMOig3GcJiYAf8jAEhhUnAAyhEqg8hk0oAsIjgAiAwmYxGA4mYzGwwkI0i0ooUnB0IBMIl1Dg8zmYyGolptPkI1m") + "Y1GAll9KoUslNIrVCqNQldShFUstXAVfrVcrlZtVhuFnsUHq1zoczoQGhFBkNpg6zbDykUkhsPHE2h85nc9n8xtVDtlex9Msd2p1YstVq9ux8HyMtzuFz1PsNTzQlv2h" + "hWfkuqpeVuN0q+nvEooN5veSAGpkb/ACcZrvhU3w83nM/poxGuchGpoVBvWgg+8knA4WimnFxI45Er5XOlHMg/Q3XU33W4ew9Wyu11mchDagcO7zus8VDoNBBEIKBpMY" + "6DqOQyokhA/IQIQmwMk4bIQFDcoO6LWgwhQkNcABwEyAB5GwWbet6cRQg3DENQ5D8QxADZvEkAB8nabsURGeBpFM3pwE2AEZRpDx/neZpOR3Dz9oO/r/wCMoZNTBQAQR" + "JSEwYg8HPGhEIoNCaEwq10gQ2WcRt7LcRxRFpuxUAEURQ3sczBEMgTTG8gN7HpOSEAEiQBAQZpmQ0DibPUFwbKcHwkhQoQtNQNzNEMbABOKDy/DMYQzHLeoPL0OTJSUd" + "0pHcxTewk5zrIygIRPslz4lEngBKIAQivgASs/kLSBTlO00f8t0vGcgUbDlDRjXLCUNRERRvRgAHW2oAICA=="); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Position"))); var_Column1->PutFormatColumn(L"1 rindex ``"); var_Column1->PutVisible(VARIANT_FALSE); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"%C1 mod 2",vtMissing); var_ConditionalFormat->PutBackColor(0x1000000); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item 1"); var_Items->AddItem("Item 2"); var_Items->AddItem("Item 3"); var_Items->AddItem("Item 4"); spGrid1->EndUpdate(); |
1067 |
How can I specify alternate background colors for each root item, similar with BackColorAlternate
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Position"))); var_Column1->PutFormatColumn(L"( ( 1:=( ( 0:=(1 rpos '') ) lfind `.`) ) < 0 ? =:0 : (=:0 left =:1) )"); var_Column1->PutVisible(VARIANT_FALSE); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"%C1 mod 2",vtMissing); var_ConditionalFormat->PutBackColor(RGB(240,240,240)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); h = var_Items->AddItem("Root 3"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); spGrid1->EndUpdate(); |
1066 |
Is it possible to change the caption from a column without to remove the column and add it with the new caption
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"ColumnName")))->PutCaption(L"NewName"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"ColumnName")))->PutHTMLCaption(L"<b>New</b>Name"); |
1065 |
FilterBarCaption ALL Keyword ( sample 2, result )
// AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); _variant_t i = spGrid1->FormatABC(L"value + 1",spGrid1->GetItems()->GetItemToIndex(Item),vtMissing,vtMissing); spGrid1->GetItems()->PutCellImage(Item,long(3),i); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); EXGRIDLib::IEditorPtr var_Editor = var_Column2->GetEditor(); var_Editor->PutEditType(EXGRIDLib::CheckValueType); var_Editor->PutOption(EXGRIDLib::exCheckValue2,long(1)); var_Column2->PutDisplayFilterButton(VARIANT_TRUE); var_Column2->PutDisplayFilterPattern(VARIANT_FALSE); var_Column2->PutFilterType(EXGRIDLib::exCheck); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Image"))); var_Column3->PutDisplayFilterButton(VARIANT_TRUE); var_Column3->PutFilterType(EXGRIDLib::exImage); var_Column3->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox)); EXGRIDLib::IColumnPtr var_Column4 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column4->PutAllowSizing(VARIANT_FALSE); var_Column4->PutAllowSort(VARIANT_FALSE); var_Column4->PutWidth(32); var_Column4->PutFormatColumn(L"1 apos ``"); var_Column4->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"Sub-Item A"); long h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"Sub-Item B"); var_Items->PutCellState(h,long(2),1); var_Items->PutCellValue(var_Items->AddItem("Item C"),long(1),"Sub-Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,_bstr_t(spGrid1->FormatABC(L"`<fgcolor=808080> ` + value + ` </fgcolor>`",spGrid1->GetDescription(EXGRIDLib::exFilterBarAnd),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(_bstr_t("(( ( all replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `[") + "<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` ) + `<r><fgcolor=808080>` + ( matchi" + "temcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcount" + " + ` item(s)`) )))"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column5 = spGrid1->GetColumns()->GetItem(long(0)); var_Column5->PutFilterType(EXGRIDLib::exFilter); var_Column5->PutFilter(L"Item A|Item B"); spGrid1->GetColumns()->GetItem(long(2))->PutFilter(L"1"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1064 |
FilterBarCaption ALL Keyword ( sample 1 )
// AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); _variant_t i = spGrid1->FormatABC(L"value + 1",spGrid1->GetItems()->GetItemToIndex(Item),vtMissing,vtMissing); spGrid1->GetItems()->PutCellImage(Item,long(3),i); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); EXGRIDLib::IEditorPtr var_Editor = var_Column2->GetEditor(); var_Editor->PutEditType(EXGRIDLib::CheckValueType); var_Editor->PutOption(EXGRIDLib::exCheckValue2,long(1)); var_Column2->PutDisplayFilterButton(VARIANT_TRUE); var_Column2->PutDisplayFilterPattern(VARIANT_FALSE); var_Column2->PutFilterType(EXGRIDLib::exCheck); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Image"))); var_Column3->PutDisplayFilterButton(VARIANT_TRUE); var_Column3->PutFilterType(EXGRIDLib::exImage); var_Column3->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox)); EXGRIDLib::IColumnPtr var_Column4 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column4->PutAllowSizing(VARIANT_FALSE); var_Column4->PutAllowSort(VARIANT_FALSE); var_Column4->PutWidth(32); var_Column4->PutFormatColumn(L"1 apos ``"); var_Column4->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"Sub-Item A"); long h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"Sub-Item B"); var_Items->PutCellState(h,long(2),1); var_Items->PutCellValue(var_Items->AddItem("Item C"),long(1),"Sub-Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,_bstr_t(spGrid1->FormatABC(L"`<fgcolor=808080> ` + value + ` </fgcolor>`",spGrid1->GetDescription(EXGRIDLib::exFilterBarAnd),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(L"all"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column5 = spGrid1->GetColumns()->GetItem(long(0)); var_Column5->PutFilterType(EXGRIDLib::exFilter); var_Column5->PutFilter(L"Item A|Item B"); spGrid1->GetColumns()->GetItem(long(2))->PutFilter(L"1"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1063 |
FilterBarCaption ALLUI Keyword ( sample 2, result )
// AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); _variant_t i = spGrid1->FormatABC(L"value + 1",spGrid1->GetItems()->GetItemToIndex(Item),vtMissing,vtMissing); spGrid1->GetItems()->PutCellImage(Item,long(3),i); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); EXGRIDLib::IEditorPtr var_Editor = var_Column2->GetEditor(); var_Editor->PutEditType(EXGRIDLib::CheckValueType); var_Editor->PutOption(EXGRIDLib::exCheckValue2,long(1)); var_Column2->PutDisplayFilterButton(VARIANT_TRUE); var_Column2->PutDisplayFilterPattern(VARIANT_FALSE); var_Column2->PutFilterType(EXGRIDLib::exCheck); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Image"))); var_Column3->PutDisplayFilterButton(VARIANT_TRUE); var_Column3->PutFilterType(EXGRIDLib::exImage); var_Column3->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox)); EXGRIDLib::IColumnPtr var_Column4 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column4->PutAllowSizing(VARIANT_FALSE); var_Column4->PutAllowSort(VARIANT_FALSE); var_Column4->PutWidth(32); var_Column4->PutFormatColumn(L"1 apos ``"); var_Column4->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"Sub-Item A"); long h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"Sub-Item B"); var_Items->PutCellState(h,long(2),1); var_Items->PutCellValue(var_Items->AddItem("Item C"),long(1),"Sub-Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,_bstr_t(spGrid1->FormatABC(L"`<fgcolor=808080> ` + value + ` </fgcolor>`",spGrid1->GetDescription(EXGRIDLib::exFilterBarAnd),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(_bstr_t("(( ( allui replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace ") + "`[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` ) + `<r><fgcolor=808080>` + ( matc" + "hitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcou" + "nt + ` item(s)`) )))"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column5 = spGrid1->GetColumns()->GetItem(long(0)); var_Column5->PutFilterType(EXGRIDLib::exFilter); var_Column5->PutFilter(L"Item A|Item B"); spGrid1->GetColumns()->GetItem(long(2))->PutFilter(L"1"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1062 |
FilterBarCaption ALLUI Keyword ( sample 1 )
// AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); _variant_t i = spGrid1->FormatABC(L"value + 1",spGrid1->GetItems()->GetItemToIndex(Item),vtMissing,vtMissing); spGrid1->GetItems()->PutCellImage(Item,long(3),i); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); EXGRIDLib::IEditorPtr var_Editor = var_Column2->GetEditor(); var_Editor->PutEditType(EXGRIDLib::CheckValueType); var_Editor->PutOption(EXGRIDLib::exCheckValue2,long(1)); var_Column2->PutDisplayFilterButton(VARIANT_TRUE); var_Column2->PutDisplayFilterPattern(VARIANT_FALSE); var_Column2->PutFilterType(EXGRIDLib::exCheck); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Image"))); var_Column3->PutDisplayFilterButton(VARIANT_TRUE); var_Column3->PutFilterType(EXGRIDLib::exImage); var_Column3->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox)); EXGRIDLib::IColumnPtr var_Column4 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column4->PutAllowSizing(VARIANT_FALSE); var_Column4->PutAllowSort(VARIANT_FALSE); var_Column4->PutWidth(32); var_Column4->PutFormatColumn(L"1 apos ``"); var_Column4->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"Sub-Item A"); long h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"Sub-Item B"); var_Items->PutCellState(h,long(2),1); var_Items->PutCellValue(var_Items->AddItem("Item C"),long(1),"Sub-Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,_bstr_t(spGrid1->FormatABC(L"`<fgcolor=808080> ` + value + ` </fgcolor>`",spGrid1->GetDescription(EXGRIDLib::exFilterBarAnd),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(L"allui"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column5 = spGrid1->GetColumns()->GetItem(long(0)); var_Column5->PutFilterType(EXGRIDLib::exFilter); var_Column5->PutFilter(L"Item A|Item B"); spGrid1->GetColumns()->GetItem(long(2))->PutFilter(L"1"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1061 |
FilterBarCaption AVAILABLE Keyword ( sample 2, result )
// AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); _variant_t i = spGrid1->FormatABC(L"value + 1",spGrid1->GetItems()->GetItemToIndex(Item),vtMissing,vtMissing); spGrid1->GetItems()->PutCellImage(Item,long(3),i); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); EXGRIDLib::IEditorPtr var_Editor = var_Column2->GetEditor(); var_Editor->PutEditType(EXGRIDLib::CheckValueType); var_Editor->PutOption(EXGRIDLib::exCheckValue2,long(1)); var_Column2->PutDisplayFilterButton(VARIANT_TRUE); var_Column2->PutDisplayFilterPattern(VARIANT_FALSE); var_Column2->PutFilterType(EXGRIDLib::exCheck); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Image"))); var_Column3->PutDisplayFilterButton(VARIANT_TRUE); var_Column3->PutFilterType(EXGRIDLib::exImage); var_Column3->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox)); EXGRIDLib::IColumnPtr var_Column4 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column4->PutAllowSizing(VARIANT_FALSE); var_Column4->PutAllowSort(VARIANT_FALSE); var_Column4->PutWidth(32); var_Column4->PutFormatColumn(L"1 apos ``"); var_Column4->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"Sub-Item A"); long h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"Sub-Item B"); var_Items->PutCellState(h,long(2),1); var_Items->PutCellValue(var_Items->AddItem("Item C"),long(1),"Sub-Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,_bstr_t(spGrid1->FormatABC(L"`<fgcolor=808080> ` + value + ` </fgcolor>`",spGrid1->GetDescription(EXGRIDLib::exFilterBarAnd),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(_bstr_t("(( ( value replace `[` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `]` with ` </b></bgcolor></fgcolor>` ) + ` ` + ( ava") + "ilable replace `[` with `<bgcolor=C0C0C0><fgcolor=FFFFFF><b> ` replace `]` with ` </b></bgcolor></fgcolor>` replace `<s>` with `" + "` replace `</s>` with `` ) + `<fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount" + " + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcount + ` item(s)`) )))"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column5 = spGrid1->GetColumns()->GetItem(long(0)); var_Column5->PutFilterType(EXGRIDLib::exFilter); var_Column5->PutFilter(L"Item A|Item B"); spGrid1->GetColumns()->GetItem(long(2))->PutFilter(L"1"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1060 |
FilterBarCaption AVAILABLE Keyword ( sample 1 )
// AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); _variant_t i = spGrid1->FormatABC(L"value + 1",spGrid1->GetItems()->GetItemToIndex(Item),vtMissing,vtMissing); spGrid1->GetItems()->PutCellImage(Item,long(3),i); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); EXGRIDLib::IEditorPtr var_Editor = var_Column2->GetEditor(); var_Editor->PutEditType(EXGRIDLib::CheckValueType); var_Editor->PutOption(EXGRIDLib::exCheckValue2,long(1)); var_Column2->PutDisplayFilterButton(VARIANT_TRUE); var_Column2->PutDisplayFilterPattern(VARIANT_FALSE); var_Column2->PutFilterType(EXGRIDLib::exCheck); EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Image"))); var_Column3->PutDisplayFilterButton(VARIANT_TRUE); var_Column3->PutFilterType(EXGRIDLib::exImage); var_Column3->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox)); EXGRIDLib::IColumnPtr var_Column4 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column4->PutAllowSizing(VARIANT_FALSE); var_Column4->PutAllowSort(VARIANT_FALSE); var_Column4->PutWidth(32); var_Column4->PutFormatColumn(L"1 apos ``"); var_Column4->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"Sub-Item A"); long h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"Sub-Item B"); var_Items->PutCellState(h,long(2),1); var_Items->PutCellValue(var_Items->AddItem("Item C"),long(1),"Sub-Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,_bstr_t(spGrid1->FormatABC(L"`<fgcolor=808080> ` + value + ` </fgcolor>`",spGrid1->GetDescription(EXGRIDLib::exFilterBarAnd),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(L"value + ` ` + available"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column5 = spGrid1->GetColumns()->GetItem(long(0)); var_Column5->PutFilterType(EXGRIDLib::exFilter); var_Column5->PutFilter(L"Item A|Item B"); spGrid1->GetColumns()->GetItem(long(2))->PutFilter(L"1"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1059 |
Is it possible to somehow highlight the column's name different than its filter value in the control's filter bar ( sample 3, results )
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column2->PutAllowSizing(VARIANT_FALSE); var_Column2->PutAllowSort(VARIANT_FALSE); var_Column2->PutWidth(32); var_Column2->PutFormatColumn(L"1 apos ``"); var_Column2->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"Sub-Item A"); var_Items->PutCellValue(var_Items->AddItem("Item B"),long(1),"Sub-Item B"); var_Items->PutCellValue(var_Items->AddItem("Item C"),long(1),"Sub-Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,_bstr_t(spGrid1->FormatABC(L"`<fgcolor=808080>` + value + `</fgcolor>`",spGrid1->GetDescription(EXGRIDLib::exFilterBarAnd),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(_bstr_t("(`<b>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) +") + " ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )) replace `[` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replac" + "e `]` with ` </b></bgcolor></fgcolor>`"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarToggle); EXGRIDLib::IColumnPtr var_Column3 = spGrid1->GetColumns()->GetItem(long(0)); var_Column3->PutFilterType(EXGRIDLib::exFilter); var_Column3->PutFilter(L"Item A|Item B"); EXGRIDLib::IColumnPtr var_Column4 = spGrid1->GetColumns()->GetItem(long(1)); var_Column4->PutFilterType(EXGRIDLib::exPattern); var_Column4->PutFilter(L"*B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1058 |
Is it possible to somehow highlight the column's name different than its filter value in the control's filter bar ( sample 2 )
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column2->PutAllowSizing(VARIANT_FALSE); var_Column2->PutAllowSort(VARIANT_FALSE); var_Column2->PutWidth(32); var_Column2->PutFormatColumn(L"1 apos ``"); var_Column2->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"Sub-Item A"); var_Items->PutCellValue(var_Items->AddItem("Item B"),long(1),"Sub-Item B"); var_Items->PutCellValue(var_Items->AddItem("Item C"),long(1),"Sub-Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,_bstr_t(spGrid1->FormatABC(L"`<fgcolor=808080>` + value + `</fgcolor>`",spGrid1->GetDescription(EXGRIDLib::exFilterBarAnd),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(L"value replace `[` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `]` with ` </b></bgcolor></fgcolor>`"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarToggle); EXGRIDLib::IColumnPtr var_Column3 = spGrid1->GetColumns()->GetItem(long(0)); var_Column3->PutFilterType(EXGRIDLib::exFilter); var_Column3->PutFilter(L"Item A|Item B"); EXGRIDLib::IColumnPtr var_Column4 = spGrid1->GetColumns()->GetItem(long(1)); var_Column4->PutFilterType(EXGRIDLib::exPattern); var_Column4->PutFilter(L"*B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1057 |
Is it possible to somehow highlight the column's name different than its filter value in the control's filter bar ( sample 1 )
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-1"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Col-2"))); var_Column1->PutDisplayFilterButton(VARIANT_TRUE); var_Column1->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column2->PutAllowSizing(VARIANT_FALSE); var_Column2->PutAllowSort(VARIANT_FALSE); var_Column2->PutWidth(32); var_Column2->PutFormatColumn(L"1 apos ``"); var_Column2->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"Sub-Item A"); var_Items->PutCellValue(var_Items->AddItem("Item B"),long(1),"Sub-Item B"); var_Items->PutCellValue(var_Items->AddItem("Item C"),long(1),"Sub-Item C"); spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,_bstr_t(spGrid1->FormatABC(L"`<fgcolor=808080>` + value + `</fgcolor>`",spGrid1->GetDescription(EXGRIDLib::exFilterBarAnd),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(L"value replace `[` with `<fgcolor=808080>[` replace `]` with `]</fgcolor>`"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarToggle); EXGRIDLib::IColumnPtr var_Column3 = spGrid1->GetColumns()->GetItem(long(0)); var_Column3->PutFilterType(EXGRIDLib::exFilter); var_Column3->PutFilter(L"Item A|Item B"); EXGRIDLib::IColumnPtr var_Column4 = spGrid1->GetColumns()->GetItem(long(1)); var_Column4->PutFilterType(EXGRIDLib::exPattern); var_Column4->PutFilter(L"*B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1056 |
Is it possible to automatically displays the control's filter label to the right
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutAllowSort(VARIANT_FALSE); var_Column1->PutWidth(32); var_Column1->PutFormatColumn(L"1 apos ``"); var_Column1->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarCaption(L"`<r>` + value"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarShowCloseOnRight | EXGRIDLib::exFilterBarToggle)); EXGRIDLib::IColumnPtr var_Column2 = spGrid1->GetColumns()->GetItem(long(0)); var_Column2->PutFilterType(EXGRIDLib::exFilter); var_Column2->PutFilter(L"Item B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1055 |
How can I get the number of results/items being shown in the control's filter bar (sample 4)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc)); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutAllowSort(VARIANT_FALSE); var_Column1->PutWidth(32); var_Column1->PutFormatColumn(L"1 apos ``"); var_Column1->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutFilterBarPrompt(_bstr_t(spGrid1->FormatABC(L"`<b>` + value",spGrid1->GetFilterBarPrompt(),vtMissing,vtMissing))); spGrid1->PutFilterBarCaption(_bstr_t("`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount ") + "+ 1) + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarShowCloseOnRight | EXGRIDLib::exFilterBarShowCloseIfRequired | EXGRIDLib::exFilterBarCaptionVisible | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->EndUpdate(); |
1054 |
How can I get the number of results being shown in the control's filter bar (sample 3)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutFilterBarCaption(_bstr_t("`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount ") + "+ 1) + ` result(s)` ) : ``)"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarCaptionVisible | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column1 = spGrid1->GetColumns()->GetItem(long(0)); var_Column1->PutFilterType(EXGRIDLib::exFilter); var_Column1->PutFilter(L"Item A|Item B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1053 |
How can I get the number of results being shown in the control's filter bar (sample 2, compact)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutFilterBarCaption(L"`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? `<off -4> ` + abs(matchitemcount + 1) + ` result(s)` : ``)"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarSingleLine | EXGRIDLib::exFilterBarCaptionVisible | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column1 = spGrid1->GetColumns()->GetItem(long(0)); var_Column1->PutFilterType(EXGRIDLib::exFilter); var_Column1->PutFilter(L"Item A|Item B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1052 |
How can I get the number of results being shown in the control's filter bar (sample 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutFilterBarCaption(L"`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCaptionVisible | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column1 = spGrid1->GetColumns()->GetItem(long(0)); var_Column1->PutFilterType(EXGRIDLib::exFilter); var_Column1->PutFilter(L"Item A|Item B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1051 |
FilterBarCaption Predefined Keywords
// AfterExpandItem event - Fired after an item is expanded (collapsed). void OnAfterExpandItemGrid1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor(); var_Editor->PutEditType(EXGRIDLib::CheckValueType); var_Editor->PutOption(EXGRIDLib::exCheckValue2,long(1)); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_FALSE); var_Column->PutFilterType(EXGRIDLib::exCheck); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutAllowSort(VARIANT_FALSE); var_Column1->PutWidth(32); var_Column1->PutFormatColumn(L"1 apos ``"); var_Column1->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); long h = var_Items->AddItem("Item B"); var_Items->PutCellState(var_Items->InsertItem(h,vtMissing,"Sub-Item B1"),long(1),1); var_Items->InsertItem(h,vtMissing,"Sub-Item B2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->AddItem("Item C"); spGrid1->PutFilterInclude(EXGRIDLib::exItemsWithChilds); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutFilterBarCaption(_bstr_t("`<fgcolor=0000FF><i>value/current</i></fgcolor>: <fgcolor=808080>` + value + `</fgcolor>` + `<br><fgcolor=0000FF><i>available</") + "i></fgcolor>: ` + available + `<br><fgcolor=0000FF><i>allui</i></fgcolor>: ` + allui + `<br><fgcolor=0000FF><i>all</i></fgcolor>" + ": ` + all + `<br><fgcolor=0000FF><i>itemcount</i></fgcolor>: <fgcolor=808080>` + itemcount + `</fgcolor>`+ `<br><fgcolor=0000FF>" + "<i>visibleitemcount</i></fgcolor>: <fgcolor=808080>` + visibleitemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>matchitemcount</" + "i></fgcolor>: <fgcolor=808080>` + matchitemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>promptpattern</i></fgcolor>: <fgcolor=8" + "08080>` + promptpattern + `</fgcolor>`+ `<br><fgcolor=0000FF><i>leafitemcount</i></fgcolor>: <fgcolor=808080>` + leafitemcount +" + " `</fgcolor>`"); spGrid1->PutFilterBarPromptPattern(L"B"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCaptionVisible | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column2 = spGrid1->GetColumns()->GetItem(long(0)); var_Column2->PutFilterType(EXGRIDLib::exFilter); var_Column2->PutFilter(L"Item A|Item B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1050 |
I am using filter prompt feature, and also column's filter, just wondering if possible to compact displaying the filter bar so it won't show on multiple lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ spGrid1->PutFilterBarFont(IFontDispPtr(((stdole::FontPtr)(spGrid1->GetFont())))); spGrid1->PutFilterBarCaption(L"`<r><i><fgcolor=808080><upline><solidline><sha ;;0>` + value"); spGrid1->PutFilterBarPromptPattern(L"B"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarSingleLine | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column1 = spGrid1->GetColumns()->GetItem(long(0)); var_Column1->PutFilterType(EXGRIDLib::exFilter); var_Column1->PutFilter(L"Item A|Item B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1049 |
Just wondering if it is possible to show the filter bar's close button on the right ( sample 2 )
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarShowCloseOnRight | EXGRIDLib::exFilterBarToggle | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->PutFilterBarPrompt(_bstr_t(spGrid1->FormatABC(L"`<r>` + value",spGrid1->GetFilterBarPrompt(),vtMissing,vtMissing))); spGrid1->EndUpdate(); |
1048 |
Just wondering if it is possible to show the filter bar's close button on the right ( sample 1 )
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutRightToLeft(VARIANT_TRUE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarToggle | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->EndUpdate(); |
1047 |
How can I change the visual appearance of the filter bar's close button (EBN)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABHQDg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLOg7IJ") + "jyI4/SJAYCydKAWhxIaZKJHCZoEDaTAADCNVAQp6MEIJVbVEI0e79OgBLp/Z7kECIJJAaRjHQdJxGLA8EhtCQhCZteK6SgMKJYXhWQYRXI1JwvMBrWrdQjiOYELQtMKm" + "SZNLYGG4dR5SVJbcYhSYsRRFMoyDIOXYDLKsdYqSpXIThObEGgaPqJYjsUjCMKnR7HVIURrBPC9TBPE69ZgmC6ucKPX51ShKFaBWDZcwFAS+UBuYCAILiEAQGZ1XT8OR" + "OicbgJgSTJRlCaZeDsHY7QGR4xkSYp3CaExZAQMgalQYAwjCAAfBANxcA2TgKAUOpDCGFhKg0RpXCwCwDHQHQHEyAIkCkOhbFOGA8A8DohBgRg9AccZcn8EpEjMLI2C2" + "DYxAgQgvAIUIVkoAAPBQDJlECTZ3CCYwDACQwUA8A5MCAWAWDiQi4l8aQOEgLJuBgBgDmYFAzEoIoIl0WALgKYJbBABADAAHgHg8VAMmqCQQDMXABAATYwTmNwBDATJX" + "AiAgjHmNQ5lgQ5QEQEQMmcWg/GwD5ylyNw2gMcJcjsBgBgOQQDDhRpVAMMwnDBFw1B0Ax8D0DxOmmJJIGQTY5hGMAwkwM4CAYLZAmAOJnAqAojiIGg6iieYkmeAYOHaK" + "JDCyCwjH6AoggsQpQliAJLhgaJ0CESBTnyDwjk+cg4g4P5IHIHJ+BWRRzlYWAxiOUxihsY4KjKLJRGqC44FCegkkkM58iAKAPnIWIWD8SRSFSfQnkmewUhYP4GiGKJ7G" + "0TIbCSUoggqUo0lAQ4LnEcBcD8Coiiif4nE+eAAn2HpOkcFJqi4T5SkyMw/kqQown8IBIBOdA+A+DJrBqVxXEqYo4lCApLhGHBnD8S4ymyfxmg+cwQkQP5egOUZIWoEA" + "kjIeIPBMBJBD+TBjBifwvkuc58hQJQPmFrYykkchclSApKjGOBuD+TRDFCfw3mmIxNi8FxFlOXhVC4aYDFyPgvg2YBcBcLZGCGCJ0DSLRzGSWQ/lmY5+mEP5gmMDBZRS" + "MRsFsOxMhMJJ/DsTpTnwaQaE+N5ojuNhdEYNI5C4TZJO1GRDmCaxnA2Yx4n8IpIjOTBQBQC5TgyYw7gUYRYikC0BYRwsDQBoB8eA6Q2hsE0BUXgywZtYCyHMKwnxSAhA" + "QHkIQhRrBaDsCwA4ERiB2EWAIYIXhhiVEgAEUYwwYjyASLge4FhHgRDkM8OQih0jWPkGgBBAQ"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarToggle | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->PutBackground(EXGRIDLib::exFooterFilterBarButton,0x1000000); spGrid1->EndUpdate(); |
1046 |
How can I change the visual appearance of the filter bar's close button (solid)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible); spGrid1->PutBackground(EXGRIDLib::exFooterFilterBarButton,RGB(255,0,0)); spGrid1->EndUpdate(); |
1045 |
Is it possible to prevent definitely showing the filter bar's close button
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible); spGrid1->PutBackground(EXGRIDLib::exFooterFilterBarButton,-1); spGrid1->EndUpdate(); |
1044 |
Is it possible to show the close button only if there is a filter applied
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarShowCloseIfRequired | EXGRIDLib::exFilterBarPromptVisible)); spGrid1->EndUpdate(); |
1043 |
The control's filter bar is not closed once I click the close button (toggle)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); var_Items->PutLockedItemCount(EXGRIDLib::exBottom,1); long h = var_Items->GetLockedItem(EXGRIDLib::exBottom,0); var_Items->PutItemDivider(h,0); var_Items->PutCellValue(h,long(0),"<c><fgcolor=808080>Press the CTRL + F to turn on/off the control's filter bar. ALT + Up/Down moves the focus."); var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML); spGrid1->PutFilterBarCaption(L"`<r><fgcolor=808080>` + value"); spGrid1->PutFilterBarPromptPattern(L"B"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarToggle | EXGRIDLib::exFilterBarSingleLine | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column1 = spGrid1->GetColumns()->GetItem(long(0)); var_Column1->PutFilterType(EXGRIDLib::exFilter); var_Column1->PutFilter(L"Item B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1042 |
How can I display the control's filter on a single line
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarCaption(L"len(value) ? `filter for: <fgcolor 808080>` + value : `<fgcolor 808080>no filter`"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarSingleLine | EXGRIDLib::exFilterBarVisible)); EXGRIDLib::IColumnPtr var_Column1 = spGrid1->GetColumns()->GetItem(long(0)); var_Column1->PutFilterType(EXGRIDLib::exFilter); var_Column1->PutFilter(L"Item A|Item B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1041 |
How can I display the control's filter on a single line (prompt-combined)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarCaption(L"`<r>` + value"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarCompact | EXGRIDLib::exFilterBarSingleLine | EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column1 = spGrid1->GetColumns()->GetItem(long(0)); var_Column1->PutFilterType(EXGRIDLib::exFilter); var_Column1->PutFilter(L"Item A|Item B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1040 |
How can I get the number of results after a filter is applied
// Click event - Occurs when the user presses and then releases the left mouse button over the grid control. void OnClickGrid1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->ClearFilter(); } // FilterChange event - Occurs when filter was changed. void OnFilterChangeGrid1() { EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); OutputDebugStringW( L"Items.MatchItemCount" ); OutputDebugStringW( _bstr_t(spGrid1->GetItems()->GetMatchItemCount()) ); OutputDebugStringW( _bstr_t(spGrid1->FormatABC(L"value < 0 ? `filter applied: ` + abs(value + 1) + ` result(s)` : `no filter`",spGrid1->GetItems()->GetMatchItemCount(),vtMissing,vtMissing)) ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible); spGrid1->PutFilterBarPromptPattern(L"Item"); spGrid1->EndUpdate(); |
1039 |
How can I programmatically clear the control's filter
// Click event - Occurs when the user presses and then releases the left mouse button over the grid control. void OnClickGrid1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->ClearFilter(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible); spGrid1->PutFilterBarPromptPattern(L"B"); spGrid1->EndUpdate(); |
1038 |
Is it possible to prevent closing the control's filter bar, so it is always shown (prompt-combined)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarPromptPattern(L"B"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::FilterBarVisibleEnum(EXGRIDLib::exFilterBarVisible | EXGRIDLib::exFilterBarPromptVisible)); EXGRIDLib::IColumnPtr var_Column1 = spGrid1->GetColumns()->GetItem(long(0)); var_Column1->PutFilterType(EXGRIDLib::exFilter); var_Column1->PutFilter(L"Item B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1037 |
Is it possible to prevent closing the control's filter bar, so it is always shown (prompt)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarPromptVisible); spGrid1->PutFilterBarPromptPattern(L"B"); spGrid1->EndUpdate(); |
1036 |
Is it possible to prevent closing the control's filter bar, so it is always shown
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Pos"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutFormatColumn(L"1 apos ``"); var_Column->PutPosition(0); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item A"); var_Items->AddItem("Item B"); var_Items->AddItem("Item C"); spGrid1->PutFilterBarCaption(L"len(value) = 0 ? `<fgcolor=808080>no filter` : value"); spGrid1->PutFilterBarPromptVisible(EXGRIDLib::exFilterBarVisible); EXGRIDLib::IColumnPtr var_Column1 = spGrid1->GetColumns()->GetItem(long(0)); var_Column1->PutFilterType(EXGRIDLib::exFilter); var_Column1->PutFilter(L"Item B"); spGrid1->ApplyFilter(); spGrid1->EndUpdate(); |
1035 |
How can I change the visual appearance of the +/- buttons, open/close glyphs as current visual theme (method 4)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutVisualDesign(_bstr_t("gBFLBWIgBAEHhEJAEGg6VAkHeLpgwChAOhULB8XAUUg8MAAREEHGMcgRCJ0ei8dhABDEcQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGc") + "TSBCIZBqEqSZLiEZRQiiCYsS5GQBRWAkEwiBiEQTjea5CgOIAFS7LIqjRQEBxhIaZYIGaiQADENo9TxIMZAfBIHShK6NJABCCSQKkYx0HScRijDIEFwGIQmbKiej4DCi" + "CQQW7OYYRVCNMQSfa8HivJyrcamfp/YBgOBYHb1eLVPR5LwfPCGUw1P6PLxkORZHimK4tSLHV7xVpMIwZFafIQhCCoHomS5NU7UNR0TQUFx9FaGX7rDDsGwLAJ6XRgF4" + "bg2VpnHePpenAN4bH2GwHFmApSjEGBLnWOpRGOTBZHOegrE6BxPiWVJqCweQrn0LgJAWJBjwgaw1gKO5HmWch5h+fovF+G5bmich4BgfZkB8dynRUVYqiUR5rnmex/F6" + "N4tn2AJfnebZ3DEXw3HWXgzAyIwgicKJKBKEIhCeCgiHyHYFEmSAFmqBghFIdgSCeIJygYDAyAgJx6AoIINAMOJNCgCZCGoGoLmMCI+CwJoihMNglCCIhzFCUg0EmMhg" + "hWDBkAiQg9CUY4jEYN4Jk2IxklYJoJHIUg+CSZJSESFwkkkGI+FOFIJEIRhPhMCRJCSVoRrSBhiDgTZjHYT4PEkYhwhgJYm0SaIaiaSYuE+GQNlmCIBGCJxjhiZQ5AkM" + "hAg6ExJCkPhPguaAiFYUAlAkKZ0g6HoOEmWR/GHcA4m0OwIlIJIHCRgQshGJhpjoaocieaZiC6GAimkUgehIOwnGYGYIGkah6jaE4rg6SpCjKK5rEOMYlGIGIihKOggl" + "oFoqj6L5aGaBo6CkGIkAQjiPpCAAaJILCTJQlKPACDaXJgmSaJsnCdJ4nygKEoijKQpSmKcqCpKoqysK0rivLAsSyLMtC1LYty4Lkui7LwvS+L8wDBMIwzEMUxjHMgyT" + "KMszDNM4zzQNE0jTNQ1TWNc2DZNo2zcN03jfOA4TiOM5DlOY5zoOk6jrOw7TuO88DxPI8z0PU9j3Pg+T6Ps/D9P4/0AQFAkDQRBUGQdCEJQpC0MQ1DkPRBEUSRNFEVBh" + "FkXRhGQ9D6Dxfh+W5gGGd4QH2XQjCmDpFFaKoVB+D5Xmed5+H8YAHnIAh9EwV5Fl0d4MkMKJICmSgygSJAoEmMUCIPgnDCCIOQFYCxJjwFoCcA4kxoF+AIJkAgExegDE" + "gEYQInAzCUAIOEGgfxiiRDYF1Q4EQ2BSCaEQYwbAiKREMpRSymFNDIAkAxT6oVRgSA2qdVKq1WqvVirMZQUhSCnBUMoIgoQRgnGSIQUgkg1hIHYAkAYMROAmHiLsE4xx" + "SCxBwEwCQ0wmDdBsE0GYXBtg2CSPMFIuwYiQBYBQeAcwOCnBCCZgw0g0glBONAQgqQThCGgPQGoBQfiRGmOEZIPAXjsBoPAO4HRThhA0EQSA5BAgaCKJIGg3QdhOCmNU" + "BoQAijTCIF0FwQxpCHDIPAYYMQGgtCmFcaQtRAjZCyFYSojQ2B2BoKwIYFApBXEIBsIQ1QsAWAWEwaA1xCgjAoIAQBAQ="); spGrid1->GetColumns()->Add(L"Column"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child"); spGrid1->EndUpdate(); |
1034 |
How can I change the visual appearance of the +/- buttons, open/close glyphs as current visual theme (method 3)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(3,_bstr_t("gBFLBCJwBAEHhEJAAEhABDwCg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQS") + "BcQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+Opf" + "DxXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4" + "llWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJegef4zluaJ3nqPJeCYH4BAeX5TDLBpVGqKRRnwf4flefZtHsX54BYAR/F+EwVnUd5eAMMJKDIChygyIQpAoEh4iIJ5Jlg" + "XIcgCXpIGoFwnGEQh6BEKBgmMIICHgIJCAiUAzgyUoAhwJohkiRgygwYpiGoKwzGIcgKCkNQNCMRIbCYCRYk4QoMiOchWDwNBjhiJJaDYTRiGiFwlCQAhOE8JBJHITIR" + "gwZRZFCFCZBkOIUhKTRpCWAwgGYQ4El4NxlBifIWCcCYCFoaoMGaKYyG6GxlBmGJdhkCAWBIeA5g4U4QhMJAImkPIShRVxGgQJRlCIUISh+SJpnCZIeBgFgiHgO4OlOM" + "INCISByECDQikkGhuh2JwpmqBogCKaYiC6FwhmkQ4yHgYgYiaHopiuaRakCbIsisSpGjYOwaHYKYMCkK5CA2IxrCwCwFigaJrkLTI6lcdANAEgIA="); var_Appearance->Add(1,"CP:3 -2 -2 2 2"); var_Appearance->Add(4,_bstr_t("gBFLBCJwBAEHhEJAAEhABEICg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQS") + "BcQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+Opf" + "DxXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4" + "llWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJeg8X4rluaZ3niGB+AQHx/EyShjjEVYqiUR5rnmex/GAB5+AIf4gEeXJFHyXZ3gCTAygyAociMKBKEKBIeCiCZyHYFAnCE" + "eBkh+BghFgRIegOCgYCySAgh4CAkgINAMmMNIgCcCYjn4LoLmMCJGDKC5ijIagoDMYhCAoJg1A0IxEhsJgJFiThChCY5yFYPA0GOGIYloNhNGIaIXCUJACE4TwkEkchO" + "FSFYlFkXhUCUCQZEYTglCSMxaEkYJIBmFJhDeDZZEYPwlgmQhghaGqVDoa4bGaeY6FGGZNlmFIBGEJ4jhiZQ5AkMhAg6E5JCkRoGCUSQ6B6CYiSCBIOh+DhJmmARiWQO" + "JtDsCJSCSBwkXSLIRicaZ6HqIIomoIguhwIpphIHoWDsJ4mCGChpmqOpGheLIOkqUo2iya4DjGJxihiQoSj4IJaDaMpCjCWoGg6PgpBiQ4tHcQJQBAgI="); var_Appearance->Add(2,"CP:4 -2 -2 2 2"); spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesAtRoot); spGrid1->PutHasButtons(EXGRIDLib::exCustom); spGrid1->PutHasButtonsCustom(VARIANT_FALSE,16777216); spGrid1->PutHasButtonsCustom(VARIANT_TRUE,33554432); spGrid1->GetColumns()->Add(L"Column"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child"); spGrid1->EndUpdate(); |
1033 |
How can I change the visual appearance of the +/- buttons, open/close glyphs as current visual theme (method 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(1,"XP:TREEVIEW 2 1"); var_Appearance->Add(2,"XP:TREEVIEW 2 2"); spGrid1->PutBackground(EXGRIDLib::exTreeGlyphOpen,0x1000000); spGrid1->PutBackground(EXGRIDLib::exTreeGlyphClose,0x2000000); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->GetColumns()->Add(L"Column"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child"); spGrid1->EndUpdate(); |
1032 |
How can I find if the control is running in DPI mode
|
1031 |
How can I change the visual appearance of the +/- buttons (method 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABDwCg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQS") + "BcQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+Opf" + "DxXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4" + "llWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJegef4zluaJ3nqPJeCYH4BAeX5TDLBpVGqKRRnwf4flefZtHsX54BYAR/F+EwVnUd5eAMMJKDIChygyIQpAoEh4iIJ5Jlg" + "XIcgCXpIGoFwnGEQh6BEKBgmMIICHgIJCAiUAzgyUoAhwJohkiRgygwYpiGoKwzGIcgKCkNQNCMRIbCYCRYk4QoMiOchWDwNBjhiJJaDYTRiGiFwlCQAhOE8JBJHITIR" + "gwZRZFCFCZBkOIUhKTRpCWAwgGYQ4El4NxlBifIWCcCYCFoaoMGaKYyG6GxlBmGJdhkCAWBIeA5g4U4QhMJAImkPIShRVxGgQJRlCIUISh+SJpnCZIeBgFgiHgO4OlOM" + "INCISByECDQikkGhuh2JwpmqBogCKaYiC6FwhmkQ4yHgYgYiaHopiuaRakCbIsisSpGjYOwaHYKYMCkK5CA2IxrCwCwFigaJrkLTI6lcdANAEgIA="); var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABEICg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQS") + "BcQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+Opf" + "DxXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4" + "llWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJeg8X4rluaZ3niGB+AQHx/EyShjjEVYqiUR5rnmex/GAB5+AIf4gEeXJFHyXZ3gCTAygyAociMKBKEKBIeCiCZyHYFAnCE" + "eBkh+BghFgRIegOCgYCySAgh4CAkgINAMmMNIgCcCYjn4LoLmMCJGDKC5ijIagoDMYhCAoJg1A0IxEhsJgJFiThChCY5yFYPA0GOGIYloNhNGIaIXCUJACE4TwkEkchO" + "FSFYlFkXhUCUCQZEYTglCSMxaEkYJIBmFJhDeDZZEYPwlgmQhghaGqVDoa4bGaeY6FGGZNlmFIBGEJ4jhiZQ5AkMhAg6E5JCkRoGCUSQ6B6CYiSCBIOh+DhJmmARiWQO" + "JtDsCJSCSBwkXSLIRicaZ6HqIIomoIguhwIpphIHoWDsJ4mCGChpmqOpGheLIOkqUo2iya4DjGJxihiQoSj4IJaDaMpCjCWoGg6PgpBiQ4tHcQJQBAgI="); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutBackground(EXGRIDLib::exTreeGlyphOpen,0x1000000); spGrid1->PutBackground(EXGRIDLib::exTreeGlyphClose,0x2000000); spGrid1->GetColumns()->Add(L"Column"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child"); spGrid1->EndUpdate(); |
1030 |
I am using single selection, the question is if possible to select an item only when the user releases the mouse, as currently it selects the item as soon as the user clicks it
// SelectionChanged event - Fired after a new item has been selected. void OnSelectionChangedGrid1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); OutputDebugStringW( L"SelectionChanged" ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->FreezeEvents(VARIANT_TRUE); spGrid1->PutSingleSel(VARIANT_TRUE); spGrid1->PutSelectOnRelease(VARIANT_TRUE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Column")))->PutFormatColumn(L"1 apos `A-Z`"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(""); var_Items->PutSelectItem(var_Items->AddItem(""),VARIANT_TRUE); var_Items->AddItem(""); spGrid1->FreezeEvents(VARIANT_FALSE); spGrid1->EndUpdate(); |
1029 |
Is it possible to select nothing
// SelectionChanged event - Fired after a new item has been selected. void OnSelectionChangedGrid1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); OutputDebugStringW( L"SelectionChanged" ); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->FreezeEvents(VARIANT_TRUE); spGrid1->PutAllowSelectNothing(VARIANT_TRUE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Column")))->PutFormatColumn(L"1 apos `A-Z`"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(""); var_Items->PutSelectItem(var_Items->AddItem(""),VARIANT_TRUE); var_Items->AddItem(""); spGrid1->FreezeEvents(VARIANT_FALSE); spGrid1->EndUpdate(); |
1028 |
How can I specify the color for control's selection when it loses the focus
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L""))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutAllowDragging(VARIANT_FALSE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutWidth(24); var_Column->PutDef(EXGRIDLib::exCellHasButton,VARIANT_TRUE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Column")))->PutFormatColumn(L"1 apos `A-Z`"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(""); var_Items->PutSelectItem(var_Items->AddItem(""),VARIANT_TRUE); var_Items->AddItem(""); spGrid1->PutBackground(EXGRIDLib::exSelBackColorHide,RGB(196,196,196)); spGrid1->PutBackground(EXGRIDLib::exSelForeColorHide,RGB(0,0,1)); spGrid1->EndUpdate(); |
1027 |
How can I change the background color for checked items (EBN color, frame)
// CellStateChanged event - Fired after cell's state has been changed. void OnCellStateChangedGrid1(long Item,long ColIndex) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutSelBackMode(EXGRIDLib::exTransparent); spGrid1->PutDefaultItemHeight(22); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Tasks"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABUkIQAAYAQGKIcBiAKBQAGYBIJDEMQ3DjAUBjMK4ZwTC4AIQjCK4JDKHYJRpHEZgLBMJAAGIZYhhUYRUiYMkiJBGGDIDiGGI2SJAcbTVIEc") + "x9EyUJSgSTJOjCMokTTIU4TTLYASbJafJJhWSaAiyMouDIOMg1BDNIw/Hika6jOgKUisNJXRzWIBTbDlOQ3JqnbCjOQRSrQBoNDAMAiiaKlbwJPK9RoieQXfwUAJrXJc" + "FqXFSLVxNBKAQEBA="); var_Appearance->Add(1,"CP:2 1 1 -1 -1"); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing); var_ConditionalFormat->PutBackColor(0x1000000); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Project"); long hChild = var_Items->InsertItem(h,vtMissing,"Task 1"); var_Items->PutSelectItem(hChild,VARIANT_TRUE); hChild = var_Items->InsertItem(h,vtMissing,"Task 2"); var_Items->PutCellState(hChild,long(0),1); hChild = var_Items->InsertItem(h,vtMissing,"Task 3"); var_Items->PutCellState(hChild,long(0),1); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1026 |
How can I change the caption of the checked items (sample 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Tasks"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column->PutFormatColumn(L"%CS0 = 1 ? `<bgcolor=000000><fgcolor=FFFFFF> ` + value + ` </fgcolor></bgcolor>` : value"); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Project"); long hChild = var_Items->InsertItem(h,vtMissing,"Task 1"); var_Items->PutSelectItem(hChild,VARIANT_TRUE); hChild = var_Items->InsertItem(h,vtMissing,"Task 2"); var_Items->PutCellState(hChild,long(0),1); hChild = var_Items->InsertItem(h,vtMissing,"Task 3"); var_Items->PutCellState(hChild,long(0),1); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1025 |
How can I change the caption of the checked items (sample 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Tasks"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1)); var_Column->PutFormatColumn(L"value + (%CS0 = 1 ? `<r><fgcolor=808080>(checked)` : ``)"); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Project"); long hChild = var_Items->InsertItem(h,vtMissing,"Task 1"); var_Items->PutSelectItem(hChild,VARIANT_TRUE); hChild = var_Items->InsertItem(h,vtMissing,"Task 2"); var_Items->PutCellState(hChild,long(0),1); hChild = var_Items->InsertItem(h,vtMissing,"Task 3"); var_Items->PutCellState(hChild,long(0),1); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1024 |
How can I change the font for the checked items
// CellStateChanged event - Fired after cell's state has been changed. void OnCellStateChangedGrid1(long Item,long ColIndex) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutDefaultItemHeight(22); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Tasks"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ stdole::FontPtr f = ::CreateObject(L"StdFont"); f->PutName(spGrid1->GetFont()->GetName()); f->PutSize(_variant_t(long(12))); var_ConditionalFormat->PutFont(IFontDispPtr(((stdole::FontPtr)(f)))); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Project"); long hChild = var_Items->InsertItem(h,vtMissing,"Task 1"); var_Items->PutSelectItem(hChild,VARIANT_TRUE); hChild = var_Items->InsertItem(h,vtMissing,"Task 2"); var_Items->PutCellState(hChild,long(0),1); hChild = var_Items->InsertItem(h,vtMissing,"Task 3"); var_Items->PutCellState(hChild,long(0),1); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1023 |
How can I bold the checked items
// CellStateChanged event - Fired after cell's state has been changed. void OnCellStateChangedGrid1(long Item,long ColIndex) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Tasks"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Project"); long hChild = var_Items->InsertItem(h,vtMissing,"Task 1"); var_Items->PutSelectItem(hChild,VARIANT_TRUE); hChild = var_Items->InsertItem(h,vtMissing,"Task 2"); var_Items->PutCellState(hChild,long(0),1); hChild = var_Items->InsertItem(h,vtMissing,"Task 3"); var_Items->PutCellState(hChild,long(0),1); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1022 |
How can I change the foreground color for checked items
// CellStateChanged event - Fired after cell's state has been changed. void OnCellStateChangedGrid1(long Item,long ColIndex) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutSelBackMode(EXGRIDLib::exTransparent); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Tasks"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing); var_ConditionalFormat->PutForeColor(RGB(255,128,128)); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Project"); long hChild = var_Items->InsertItem(h,vtMissing,"Task 1"); var_Items->PutSelectItem(hChild,VARIANT_TRUE); hChild = var_Items->InsertItem(h,vtMissing,"Task 2"); var_Items->PutCellState(hChild,long(0),1); hChild = var_Items->InsertItem(h,vtMissing,"Task 3"); var_Items->PutCellState(hChild,long(0),1); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1021 |
How can I change the background color for checked items (solid color)
// CellStateChanged event - Fired after cell's state has been changed. void OnCellStateChangedGrid1(long Item,long ColIndex) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->Refresh(); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->PutSelBackMode(EXGRIDLib::exTransparent); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Tasks"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing); var_ConditionalFormat->PutBackColor(RGB(255,128,128)); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Project"); long hChild = var_Items->InsertItem(h,vtMissing,"Task 1"); var_Items->PutSelectItem(hChild,VARIANT_TRUE); hChild = var_Items->InsertItem(h,vtMissing,"Task 2"); var_Items->PutCellState(hChild,long(0),1); hChild = var_Items->InsertItem(h,vtMissing,"Task 3"); var_Items->PutCellState(hChild,long(0),1); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1020 |
How can I export the cell's state as well
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C1")))->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C2")))->PutFormatColumn(L"1 index `A-Z`"); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C3")))->PutFormatColumn(L"100 index ``"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item 1"); var_Items->PutCellState(var_Items->AddItem("Item 2"),vtMissing,1); var_Items->PutCellState(var_Items->AddItem("Item 3"),vtMissing,1); spGrid1->EndUpdate(); OutputDebugStringW( L"Export CSV Items including Check-State:" ); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check"))); var_Column->PutPosition(0); var_Column->PutFormatColumn(L"%CS0"); OutputDebugStringW( _bstr_t(spGrid1->Export("",vtMissing)) ); spGrid1->GetColumns()->Remove("Check"); spGrid1->EndUpdate(); |
1019 |
Is it possible to customize the editor selection colour of the built in text editor, from standard blue to black
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutSelBackColor(RGB(0,0,0)); spGrid1->PutSelForeColor(RGB(255,255,255)); EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Edit")))->GetEditor(); var_Editor->PutEditType(EXGRIDLib::MaskType); var_Editor->PutMask(L";;;rich"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(""); var_Items->AddItem("Just a text"); var_Items->AddItem(""); spGrid1->EndUpdate(); |
1018 |
Is it possible to customize the editor selection colour of the built in dropdown editor, from standard blue to black
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutSelBackColor(RGB(0,0,0)); spGrid1->PutSelForeColor(RGB(255,255,255)); EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"DropDown")))->GetEditor(); var_Editor->AddItem(1,L"This is just the first item",vtMissing); var_Editor->AddItem(2,L"This is just the second item",vtMissing); var_Editor->AddItem(3,L"This is just the third item",vtMissing); var_Editor->PutEditType(EXGRIDLib::DropDownType); var_Editor->PutMask(L";;;rich"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(""); var_Items->AddItem("Just a text"); var_Items->AddItem(""); spGrid1->EndUpdate(); |
1017 |
The BeforeExpandItem event is fired when clicking the drop down filter button. What we can do to prevent that
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). void OnBeforeExpandItemGrid1(long Item,VARIANT FAR* Cancel) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); OutputDebugStringW( L"BeforeExpandItem" ); OutputDebugStringW( L"Item" ); OutputDebugStringW( L"ColumnFromPoint" ); OutputDebugStringW( _bstr_t(spGrid1->GetColumnFromPoint(-1,-1)) ); OutputDebugStringW( L"ColumnFromPoint return -1, if the user clicks the +/- glitch, else it returns the index of the column where the click occurs." ); spGrid1->GetItems()->InsertItem(Item,vtMissing,"new child"); } EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Items")))->PutDisplayFilterButton(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemHasChildren(var_Items->InsertItem(vtMissing,vtMissing,"Group 1"),VARIANT_TRUE); var_Items->PutItemHasChildren(var_Items->InsertItem(vtMissing,vtMissing,"Group 2"),VARIANT_TRUE); spGrid1->EndUpdate(); |
1016 |
How do I change the drop down filter icon/button (black)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQ") + "gmPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYTh" + "dr4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA"); spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,-1); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarButton,0x1000000); spGrid1->PutBackground(EXGRIDLib::exBackColorFilter,RGB(0,0,1)); spGrid1->PutBackground(EXGRIDLib::exForeColorFilter,RGB(255,255,255)); spGrid1->PutDescription(EXGRIDLib::exFilterBarExclude,L"<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>"); spGrid1->PutHeaderAppearance(EXGRIDLib::None2); spGrid1->PutBackColorHeader(RGB(0,0,0)); spGrid1->PutForeColorHeader(RGB(255,255,255)); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Filter"))); var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowCheckBox)); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutAllowDragging(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("One"); var_Items->AddItem("Two"); var_Items->AddItem("Three"); spGrid1->EndUpdate(); |
1015 |
How do I change the drop down filter icon/button (white)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgAN") + "J0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8Y" + "NYuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4" + "hhKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mg" + "bhOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhW" + "BMJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI="); var_Appearance->Add(1,"CP:2 -4 -4 2 4"); spGrid1->PutBackground(EXGRIDLib::exHeaderFilterBarButton,0x1000000); spGrid1->PutBackground(EXGRIDLib::exCursorHoverColumn,spGrid1->GetBackColor()); spGrid1->PutHeaderAppearance(EXGRIDLib::None2); spGrid1->PutHeaderHeight(24); spGrid1->PutBackColorHeader(RGB(255,255,255)); spGrid1->PutHeaderVisible(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Filter"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutAllowSort(VARIANT_FALSE); var_Column->PutAllowDragging(VARIANT_FALSE); spGrid1->EndUpdate(); |
1014 |
How can I draw a solid frame around the the focusing item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutSingleSel(VARIANT_FALSE); spGrid1->PutDefaultItemHeight(20); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->PutRenderType(-1); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABOkGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeDYMiSNoYDJCM4wH") + "IURRJFCUJSGWQpTgSIgyT5HFIxXKoASbJabZLhWS6EpWOotTbIQQRYCkEyfKKfZyGURZQqOKA1DBZErWTJESRFJqLazgO4LAhyQYrVgAErzVKVCRNOqbJzADApdpGQJT" + "ULDNTQHRFIyhOSnIRrWbMAhid6JUZiVT4dBOIYhSYANAqCwLFqrDJmWrpV5WZjlZ47V6BdAyXJsIrmFJEXaOGhyDDlGybSDZYryfZhUziUw4XjbWwZDqPF6DKTTdSGLR" + "EE8WZVlURZvDaep3C+AY8kAYRgGCCBJECUhjDoHROEYWgoAGTQ1CEEx9lGMY0CQUYSnuZQDBGBYFlOH5+H+igGAKAJgEgFgGgGVgDn4CoCmCSA2A6A5hAgDgQgSYRIE4" + "EoFGGCBiBeBhhkgPgbgcYgICoH4IGGWIOCSBhiGiHgVgoYooFoAoLGIWI+DCCgjCiTgrgII4ImYOoOmOSJ2AYOpWlQDQBICA="); spGrid1->PutShowFocusRect(VARIANT_TRUE); spGrid1->PutBackground(EXGRIDLib::exShowFocusRect,0x1000000); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"P1"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1013 |
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutSingleSel(VARIANT_FALSE); spGrid1->PutDefaultItemHeight(20); spGrid1->PutShowFocusRect(VARIANT_TRUE); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->PutRenderType(-1); var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeCRUgyJI3RgMUIzV") + "AcRRFEiUJQlIZZCjOAw0SIMU7xZRcNxsACnaZnCR4NiuRYiUhOcqzRIQIQ4CiEahqOgJbDUJYwWZKAyjBY8XTZFCSJCpeJ6egOc5jRxQUp1WAEXx3GSsJKvCZ5cADBY+" + "VLQNS0JBtMSTKSLaiuWoIJqCPaDRheWKQJh1NSnLqEcjyYANDxDCZlWzAYxWTZ2Uz7N7PbB0HY4DyPGKZYrfESVRbQcZNS6nNigPI9XhfGq6VjRe63ZaOaYpWrnOJqTR" + "WjOKYujWdZ2BGO5lkuBAAkmcQkDmDBEAwEQJCgGhMGcQ4pkiSxGAAOYmkQIhvkYNg2gSCgyj+LI4GIMIwF2XQoAYAoAmASAWAaAZgggJgKFiT54DYDoDmECBGBKBJgGg" + "TgWgWYRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChiigYgsgsYYYBYMIKCMKJOCuDRjGiOgLg6Y5InYPoPmQCAkmsXAQDQBCAg="); var_Appearance->Add(3,"CP:2 -3 0 3 0"); spGrid1->PutBackground(EXGRIDLib::exShowFocusRect,0x3010101); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"P1"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1012 |
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutSingleSel(VARIANT_FALSE); spGrid1->PutShowFocusRect(VARIANT_TRUE); EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABHoDg6AADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFiCCQwSDKEjyCKcGRHF6MI6gOYpCgOIYjRJNIASV") + "AceAAGaUZrjSgobjmOYhAJCLqhYIgASXJqLaBlOCaAieSc+QhjQJIJoeCZXU5TFg1BTsOhqEqcRiseaRVDCaIJWzbdYWLDdNQHHKYLjnWorbpSJZ5XjNEySDQkMS9PrE" + "J7vST8FBCdAABLJUB2BR9RwxRafKpnWwJDpmCaOQLXEB5DK1PyVMTKYrtGy7GrIAJxWxbV4UHh+QABOzIMAvHKJMwvHYcUZne5XVLeF41HbONogPaJZyIAK2cLROq6Xo" + "7GEcJZEcLASB4DwvgWUZlE6AQQhKAYkkYdA6hyDIwHgSoqFwQgmnsYxjGgSIiBOTpSEiAwRgOJI7j4JAHA6U5wm0MpPlOBIjD8TZiGYCICiCGAuA6AxhAgMgSgOYQ4DY" + "Bg/g6cw1n+ABOmMMJ9DmCwjnScw4RsVJngkYh4hoKIKmKKI2CmC5ikiQgqgiT5jhyMw8g4QwIn0OIKEiCJhD8DwTGyfA7k0WQOEWEQkGkJhIhKZB5DYSoTiSCQEn4PQO" + "COXJcCeIJjliaIQk0aRyF4O5llmAhfhgZhJg4ZoYiaAxYn4PZOhOZJaCUZYTiYQw1mcOZUm+HQnHmWh4h6Z4pnYeYfk0eYsmqG4nAgNJ2DqD5DkCWoiGiOgqgyI5omoR" + "oNiSaQKFKEojCaM4ugSFhOjkAJcieKgDkaH4oioGoOiaKRqgqEoqDddwyhuAxPgOMJ8DyDZqk6NYtCsapmjiLprHqdo6i+K5K1oPhOlqPgKD4DpjnII4yiOewuk6MxtA" + "sMpSjObQ7EaT4wk6ewYn0PgPAiCJkjeLgDk6X44i4G4OmaORuguEpqDkLAzkaWg+E8GIUmaPIvEOVpzj2Lxbl6eo+G+S5in4OYPmOaJyjuTwjnYWpBg6DAjAqQZwkwJw" + "NkKcJsEcEJCDBEpaD6Dw8BiapGjGSgfB2RpxmyBwgkicZ8haBw/g+M5TBcPQPlOXJskscp8jsMJMnMLJXDGTZzEyYw2kwMoDlcFw9i2M4/EGUJPg0CxFlENBtCcSJSnQ" + "fQ0m+SgPHsaJ7lALZLG6XZVHWDRfFqVY1k0ZxdladYTnifJUGaeAWAeMnSGcGWgBObJ3lWbwdjKW5cHcTZPHaLkN4GxXDlFqFsA4uRbBOGAFAEIzAsDEFOBkfYqR4D6A" + "OBEYo8QuBvAmMceInBDgcD0JwOIqQyJ1DMAwG4IANDnHSMoK4QhOgMBGNEIQvQWAdGenETIswGiddsAAQAgCAgA=="); var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABeEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADDFIBQSLAYROGSDJBGODJDjWGIeQLOEhQH") + "IMRxPE6UYLhWYpBDKPYcUbGc7yBBMVwGf59XzACoKSheQIVSDQkw6Fo6NYhAxHALyNRkBy8f60KjtGpodDUJYvW5JYyjBZ8EznOqbJBkeJ7BgOe5NQjaD72VgdWQJFSW" + "JajWYYJDOJY2ZAAE5TVINEwxJbDaylChIdxaF6WAzZEBhBYoATPNLBMrhWqKDw2XaQWBCOgwHYeR5LU7BdRwbIrRq2eAAXbcVyXfDddZlBK+QA0SK9lRVTKvJZmKgBWw" + "1COSxmAAGw4kcNx1iKFBiCAfQsG8lJemucg7nsXpUHOOxrm+DI3jOH4XAOBx2nscw0j2HhPG4L5uGEVIECQCBCEUAYkGMHQHFGSBlGaAxkEgQgTGCVBsDYQhCgQJZrHK" + "UggGEShkFGNgIlsNpPnMHJHD+TADAIJIJiIWIeCqChikiIgmgiD5zHyXxgiACJKCuC4jHiZgtg6I4IlkCQwkwOIonMPJjEkFhGhGZBpA4KoMBCGJuEiE5lAkGg7hMY4J" + "EYVoUCUNAOE6FZl0KWQACWOR2GKF5mBmChchkJRZhoXYaCKKYqGuDglEmNhuhWZpIiYc4dCcCRqGmHZlgm2YxAwSQKESHwkFkKgpiAIAIH4PIimOOg2DiChoiQJRRD+T" + "ZDHCfwyAyCgyg+JpiioYJ/DgDgIlECQ6lwRAEICA="); var_Appearance->Add(3,"CP:2 -2 0 2 0"); spGrid1->PutSelBackColor(0x1000000); spGrid1->PutSelForeColor(RGB(0,0,0)); spGrid1->PutBackground(EXGRIDLib::exShowFocusRect,0x3ff0000); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"P1"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1011 |
I have a column right-aligned. How can I display its check box aligned to the right, as it appears to the left of the cell's caption
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutColumnAutoResize(VARIANT_TRUE); spGrid1->PutDrawGridLines(EXGRIDLib::exVLines); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Left"))); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutWidth(96); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutFormatColumn(L"0 pos `A-Z`"); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Center"))); var_Column1->PutHeaderAlignment(EXGRIDLib::CenterAlignment); var_Column1->PutAlignment(var_Column1->GetHeaderAlignment()); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutWidth(96); var_Column1->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column1->PutFormatColumn(L"0 pos `A-Z`"); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Right"))); var_Column2->PutHeaderAlignment(EXGRIDLib::RightAlignment); var_Column2->PutAlignment(var_Column2->GetHeaderAlignment()); var_Column2->PutAllowSizing(VARIANT_FALSE); var_Column2->PutWidth(96); var_Column2->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column2->PutFormatColumn(L"0 pos `A-Z`"); var_Column2->PutDef(EXGRIDLib::exCellDrawPartsOrder,"caption,check,icon,icons,picture"); var_Columns->Add(L""); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1); var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1); var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1); spGrid1->EndUpdate(); |
1010 |
Can I display the column's multiple-lines caption vertically oriented (method 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderHeight(48); spGrid1->PutColumnAutoResize(VARIANT_TRUE); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"And others ..."); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L""))); var_Column->PutHTMLCaption(L"First Column"); var_Column->PutHeaderVertical(VARIANT_TRUE); var_Column->PutWidth(36); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutDef(EXGRIDLib::exCellPaddingLeft,long(8)); var_Column->PutPosition(0); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L""))); var_Column1->PutHTMLCaption(L"<c><b>Second Column"); var_Column1->PutHeaderVertical(VARIANT_TRUE); var_Column1->PutWidth(36); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column1->PutDef(EXGRIDLib::exCellPaddingLeft,long(8)); var_Column1->PutPosition(1); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L""))); var_Column2->PutHTMLCaption(L"<r>Third Column"); var_Column2->PutHeaderVertical(VARIANT_TRUE); var_Column2->PutWidth(36); var_Column2->PutAllowSizing(VARIANT_FALSE); var_Column2->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column2->PutDef(EXGRIDLib::exCellPaddingLeft,long(8)); var_Column2->PutPosition(2); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1); var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1); var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1); spGrid1->EndUpdate(); |
1009 |
Can I display the column's multiple-lines caption vertically oriented (method 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderHeight(48); spGrid1->PutHeaderSingleLine(VARIANT_FALSE); spGrid1->PutColumnAutoResize(VARIANT_TRUE); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"And others ..."); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"First Column"))); var_Column->PutHeaderVertical(VARIANT_TRUE); var_Column->PutWidth(36); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutDef(EXGRIDLib::exCellPaddingLeft,long(8)); var_Column->PutPosition(0); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Second Column"))); var_Column1->PutHeaderBold(VARIANT_TRUE); var_Column1->PutHeaderVertical(VARIANT_TRUE); var_Column1->PutWidth(36); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column1->PutDef(EXGRIDLib::exCellPaddingLeft,long(8)); var_Column1->PutPosition(1); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Third Column"))); var_Column2->PutHeaderVertical(VARIANT_TRUE); var_Column2->PutWidth(36); var_Column2->PutAllowSizing(VARIANT_FALSE); var_Column2->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column2->PutDef(EXGRIDLib::exCellPaddingLeft,long(8)); var_Column2->PutPosition(2); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1); var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1); var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1); spGrid1->EndUpdate(); |
1008 |
Can I display the column's caption vertically oriented (method 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderHeight(48); spGrid1->PutColumnAutoResize(VARIANT_TRUE); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"And others ..."); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L""))); var_Column->PutHTMLCaption(L"First"); var_Column->PutHeaderVertical(VARIANT_TRUE); var_Column->PutWidth(20); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPosition(0); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L""))); var_Column1->PutHTMLCaption(L"<c><b>Second"); var_Column1->PutHeaderVertical(VARIANT_TRUE); var_Column1->PutWidth(20); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column1->PutPosition(1); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L""))); var_Column2->PutHTMLCaption(L"<r>Third"); var_Column2->PutHeaderVertical(VARIANT_TRUE); var_Column2->PutWidth(20); var_Column2->PutAllowSizing(VARIANT_FALSE); var_Column2->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column2->PutPosition(2); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1); var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1); var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1); spGrid1->EndUpdate(); |
1007 |
Can I display the column's caption vertically oriented (method 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutHeaderHeight(48); spGrid1->PutColumnAutoResize(VARIANT_TRUE); EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns(); var_Columns->Add(L"And others ..."); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"First"))); var_Column->PutHeaderVertical(VARIANT_TRUE); var_Column->PutWidth(20); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPosition(0); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Second"))); var_Column1->PutHeaderBold(VARIANT_TRUE); var_Column1->PutHeaderVertical(VARIANT_TRUE); var_Column1->PutWidth(20); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column1->PutPosition(1); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Third"))); var_Column2->PutHeaderVertical(VARIANT_TRUE); var_Column2->PutWidth(20); var_Column2->PutAllowSizing(VARIANT_FALSE); var_Column2->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column2->PutPosition(2); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1); var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1); var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1); spGrid1->EndUpdate(); |
1006 |
How do I automatically bold items being checked
// CellStateChanged event - Fired after cell's state has been changed. void OnCellStateChangedGrid1(long Item,long ColIndex) { } /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutSelBackMode(EXGRIDLib::exTransparent); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"%CS0","check"); var_ConditionalFormat->PutBold(VARIANT_TRUE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")))->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(spGrid1->GetConditionalFormats()->GetItem("check")->GetExpression())))->PutFormatColumn(spGrid1->GetConditionalFormats()->GetItem("check")->GetExpression()); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Item 1"); var_Items->PutCellState(var_Items->AddItem("Item 2"),long(0),1); var_Items->AddItem("Item 3"); spGrid1->EndUpdate(); |
1005 |
How can I use the CellState with ConditionalFormat/ComputedField/FormatColumn
// CellStateChanged event - Fired after cell's state has been changed. void OnCellStateChangedGrid1(long Item,long ColIndex) { } /* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesInsideLeaf); spGrid1->PutSelBackMode(EXGRIDLib::exTransparent); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items"))); var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Format"))); var_Column1->PutFormatColumn(L"%CS0"); var_Column1->PutCaption(var_Column1->GetFormatColumn()); var_Column1->PutDef(EXGRIDLib::exCellForeColor,long(8421504)); var_Column1->PutDef(EXGRIDLib::exHeaderForeColor,var_Column1->GetDef(EXGRIDLib::exCellForeColor)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Item 1"); var_Items->PutCellState(var_Items->InsertItem(h,vtMissing,"Item 2"),long(0),1); var_Items->PutCellState(var_Items->InsertItem(h,vtMissing,"Item 3"),long(0),1); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->EndUpdate(); |
1004 |
How can I use the CellData with ConditionalFormat/ComputedField/FormatColumn
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->GetColumns()->Add(L"Items"); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Format"))); var_Column->PutFormatColumn(L"%CD0"); var_Column->PutCaption(var_Column->GetFormatColumn()); var_Column->PutDef(EXGRIDLib::exCellForeColor,long(8421504)); var_Column->PutDef(EXGRIDLib::exHeaderForeColor,var_Column->GetDef(EXGRIDLib::exCellForeColor)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellData(var_Items->AddItem("Item 1"),long(0),long(1234)); var_Items->PutCellData(var_Items->AddItem("Item 2"),long(0),"this is just an user data"); var_Items->PutCellData(var_Items->AddItem("Item 3"),long(0),COleDateTime(2001,1,1,0,00,00).operator DATE()); spGrid1->EndUpdate(); |
1003 |
How can I use the CellValue/CellCaption with ConditionalFormat/ComputedField/FormatColumn
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items"))); EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor(); var_Editor->PutEditType(EXGRIDLib::DropDownListType); var_Editor->AddItem(1,L"Item 1",vtMissing); var_Editor->AddItem(2,L"Item 2",vtMissing); var_Editor->AddItem(3,L"Item 3",vtMissing); EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Format"))); var_Column1->PutFormatColumn(L"%0"); var_Column1->PutCaption(var_Column1->GetFormatColumn()); var_Column1->PutDef(EXGRIDLib::exCellForeColor,long(8421504)); var_Column1->PutDef(EXGRIDLib::exHeaderForeColor,var_Column1->GetDef(EXGRIDLib::exCellForeColor)); var_Column1->PutAllowSizing(VARIANT_FALSE); EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Format"))); var_Column2->PutFormatColumn(L"%C0"); var_Column2->PutCaption(var_Column2->GetFormatColumn()); var_Column2->PutDef(EXGRIDLib::exCellForeColor,long(8421504)); var_Column2->PutDef(EXGRIDLib::exHeaderForeColor,var_Column2->GetDef(EXGRIDLib::exCellForeColor)); var_Column2->PutAllowSizing(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem(long(1)); var_Items->PutCellValue(var_Items->AddItem(long(0)),long(0),long(2)); var_Items->AddItem(long(2)); spGrid1->EndUpdate(); |
1002 |
Can I display the radio-button with a solid color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutRadioImage(VARIANT_FALSE,32699122); spGrid1->PutRadioImage(VARIANT_TRUE,16777216); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check")))->PutDef(EXGRIDLib::exCellHasRadioButton,VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Radio 1"); var_Items->PutCellState(var_Items->AddItem("Radio 2"),long(0),1); var_Items->AddItem("Radio 1"); spGrid1->EndUpdate(); |
1001 |
Can I display the check-box with a solid color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->BeginUpdate(); spGrid1->PutCheckImage(EXGRIDLib::Unchecked,32699122); spGrid1->PutCheckImage(EXGRIDLib::Checked,16777216); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check")))->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->AddItem("Check 1"); var_Items->PutCellState(var_Items->AddItem("Check 2"),long(0),1); var_Items->AddItem("Check 3"); spGrid1->EndUpdate(); |